1234567891011121314151617181920212223242526 |
- from Base import Base
- from Util import Strings
- class ServicePort(Base):
- # Contains object id created to database to table profile
- idDataBaseProfile = 0
- number = None
- gemport = None
- vlan = None
- type = None
- def __init__(self):
- Base.__init__(self)
- def get_service_port(self):
- """
- Get the service-port number
- :return: Return the service-port number or blank
- """
- data_compare = self.name.lower().split()
- index = Strings.index_value(data_compare, "service-port")
- if index >= 0:
- return data_compare[index + 1].strip()
- else:
- return ""
|