def configure_vlan(eapi_conn, vlan_id, vlan_name=None):
 command_str1 = 'vlan {}'.format(vlan_id)
 cmd = [command_str1]
 if (vlan_name is not None):
  command_str2 = 'name {}'.format(vlan_name)
  cmd.append(command_str2)
 return eapi_conn.config(cmd)

def configure_vlan ( eapi_conn , vlan_id , vlan_name = None ) : command_str1 = 'vlan {}' . format ( vlan_id ) cmd = [ command_str1 ] if ( vlan_name is not None ) : command_str2 = 'name {}' . format ( vlan_name ) cmd . append ( command_str2 ) return eapi_conn . config ( cmd )
add the given vlan_id to the switch set the vlan_name note .