I can think have 5 ways you could have accomplished the goal of network configuration without a keyboard and mouse off the top of my head.
1. The Pi A's USB port can be configured for slave mode. The B doesn't support this but not sure if you needed a B.
2. You can fake a USB device over the GPIO ports on both the A and B through various bitbang techniques.
3. You can use the UART pins and a USB to UART chip which wouldn't be a very expensive add on.
4. Add a DHCP server to the Pi, so when connected directly to a PC with ethernet, the PC gets an IP from the Pi. Your PC program can then connect to the Pi for final network config.
5. Add a cheap two line LCD and some push buttons to your device. Create a simple text driven menu for configuring the network through that.