Chip Boling | f5af85d | 2019-02-12 15:36:17 -0600 | [diff] [blame] | 1 | # Copyright 2017-present Adtran, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | |
| 16 | class TCont(object): |
| 17 | """ |
| 18 | Class to wrap TCont capabilities |
| 19 | """ |
| 20 | def __init__(self, alloc_id, tech_profile_id, traffic_descriptor, uni_id, is_mock=False): |
| 21 | self.alloc_id = alloc_id |
| 22 | self.traffic_descriptor = traffic_descriptor |
| 23 | self._is_mock = is_mock |
| 24 | self.tech_profile_id = tech_profile_id |
| 25 | self.uni_id = uni_id |
| 26 | |
| 27 | def __str__(self): |
| 28 | return "TCont: alloc-id: {}, uni-id: {}".format(self.alloc_id, |
| 29 | self.uni_id) |