Add the new number field in the ports table

Added in several places:
 * database creation code
 * port addition code

Change-Id: Id4e2bd2704d5b9660df8baad34abda0f613ba4f2
diff --git a/util.py b/util.py
index d1b2a51..45f82a3 100644
--- a/util.py
+++ b/util.py
@@ -130,6 +130,7 @@
                 ret = db.create_switch(data['name'])
             elif command == 'db.create_port':
                 ret = db.create_port(data['switch_id'], data['name'],
+                                     int(data['number']),
                                      state.default_vlan_id,
                                      state.default_vlan_id)
             elif command == 'db.delete_switch':
@@ -722,6 +723,7 @@
             logging.debug('  trying to import port %s', port_name)
             port_id = None
             port_mode = s.port_get_mode(port_name)
+            port_number = s.port_map_name_to_number(port_name)
             if port_mode == 'access':
                 # Access ports are easy - just create the port, and
                 # set both the current and base VLANs to the current
@@ -729,7 +731,7 @@
                 # import if needed.
                 port_vlans[port_name] = (s.port_get_access_vlan(port_name),)
                 port_vlan_id = db.get_vlan_id_by_tag(port_vlans[port_name][0])
-                port_id = db.create_port(switch_id, port_name,
+                port_id = db.create_port(switch_id, port_name, port_number,
                                          port_vlan_id, port_vlan_id)
                 logging.debug('    access port, VLAN %d', int(port_vlans[port_name][0]))
                 # Nothing further needed
@@ -744,7 +746,7 @@
                 if port_vlans[port_name] == [] or port_vlans[port_name] is None or 'ALL' in port_vlans[port_name]:
                     port_vlans[port_name] = (state.config.vland.default_vlan_tag,)
                 port_vlan_id = db.get_vlan_id_by_tag(port_vlans[port_name][0])
-                port_id = db.create_port(switch_id, port_name,
+                port_id = db.create_port(switch_id, port_name, port_number,
                                          port_vlan_id, port_vlan_id)
                 # Append to a list of trunk ports that we will need to
                 # modify once we're done
@@ -757,7 +759,7 @@
                 s.port_set_mode(port_name, 'access')
                 port_vlans[port_name] = (s.port_get_access_vlan(port_name),)
                 port_vlan_id = db.get_vlan_id_by_tag(port_vlans[port_name][0])
-                port_id = db.create_port(switch_id, port_name,
+                port_id = db.create_port(switch_id, port_name, port_number,
                                          port_vlan_id, port_vlan_id)
                 logging.debug('    Found port in %s mode', port_mode)
                 logging.debug('    Forcing to access mode, VLAN %d', int(port_vlans[port_name][0]))