TrafficProfile.py 596 B

12345678910111213141516171819202122
  1. from Base import Base
  2. from Util import Strings
  3. class TrafficProfile(Base):
  4. # Contains object id created to database to table profile
  5. idDataBaseProfile = 0
  6. def __init__(self):
  7. Base.__init__(self)
  8. def get_traffic_profile(self):
  9. """
  10. Get the traffic profile name
  11. :return: Return the traffic profile or blank
  12. """
  13. data_compare = self.name.lower().split()
  14. index = Strings.index_value(data_compare, "traffic-profile")
  15. if index >= 0:
  16. return data_compare[index + 1].strip()
  17. else:
  18. return ""