def create_access_port(network_switch, port_name, vlan):
 debug = False
 new_port = SwitchPort.objects.get_or_create(port_name=port_name, mode='access', access_vlan=vlan, network_switch=network_switch)
 if debug:
  print new_port

def create_access_port ( network_switch , port_name , vlan ) : debug = False new_port = SwitchPort . objects . get_or_create ( port_name = port_name , mode = 'access' , access_vlan = vlan , network_switch = network_switch ) if debug : print new_port
create a switchport object - access port .