self._portprofile_counter += 1
self._portprofile_counter %= int(conf.MAX_PORT_PROFILES)
id = tenant_id[:3] + "-pp-" + \
- ("0" * (6 - len(str(self._net_counter)))) + str(self._net_counter)
+ ("0" * (6 - len(str(self._net_counter)))) \
+ + str(self._portprofile_counter)
# TODO (Sumit): Need to check if the ID has already been allocated
# ID will be generated by DB
return id
-# TODO (Sumit):
- # (1) Persistent storage
+
+def main():
+ client = L2Network()
+ client.create_portprofile("12345", "tpp1", "2")
+ client.create_portprofile("12345", "tpp2", "3")
+ print ("%s\n") % client.get_all_portprofiles("12345")
+
+if __name__ == '__main__':
+ main()
+
+"""
+TODO (Sumit):
+(1) Persistent storage
+"""