Removing net.hpp and net.cpp because functionality moved

The functionality provided by net.hpp and net.cpp has been moved into
the channel_mgmt class.

Change-Id: I4820609f87f27ebe81d9b36f7b8e95a5262985ac
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/Makefile.am b/Makefile.am
index 738092c..39f1344 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,8 +17,7 @@
 libipmi20_BUILT_LIST = \
 	sensor-gen.cpp \
 	inventory-sensor-gen.cpp \
-	fru-read-gen.cpp \
-	channel-gen.cpp
+	fru-read-gen.cpp
 
 BUILT_SOURCES = \
 	ipmiwhitelist.cpp \
@@ -65,12 +64,8 @@
 fru-read-gen.cpp:
 	$(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
 
-channel-gen.cpp:
-	$(AM_V_GEN)@CHANNELGEN@ -o $(top_builddir) generate-cpp
-
 providers_LTLIBRARIES += libipmi20.la
 libipmi20_la_SOURCES = \
-	net.cpp \
 	app/channel.cpp \
 	app/watchdog.cpp \
 	app/watchdog_service.cpp \
diff --git a/configure.ac b/configure.ac
index 8d5e6dd..1f5ec66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,10 +93,6 @@
 FRUGEN="$PYTHON $srcdir/scripts/fru_gen.py -i $FRU_YAML_GEN"
 AC_SUBST(FRUGEN)
 
-AS_IF([test "x$CHANNEL_YAML_GEN" == "x"], [CHANNEL_YAML_GEN="channel-example.yaml"])
-CHANNELGEN="$PYTHON ${srcdir}/scripts/channel_gen.py -i $CHANNEL_YAML_GEN"
-AC_SUBST(CHANNELGEN)
-
 AC_DEFINE(CALLOUT_FWD_ASSOCIATION, "callout", [The name of the callout's forward association.])
 AC_DEFINE(BOARD_SENSOR, "/xyz/openbmc_project/inventory/system/chassis/motherboard", [The inventory path to the motherboard fault sensor.])
 AC_DEFINE(SYSTEM_SENSOR, "/xyz/openbmc_project/inventory/system", [The inventory path to the system event sensor.])
diff --git a/net.cpp b/net.cpp
deleted file mode 100644
index 9de190f..0000000
--- a/net.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "utils.hpp"
-
-#include <map>
-#include <string>
-
-// Not sure if this should live in utils.  Because it's really a per-system
-// configuration, instead of just hard-coding channel 1 to be eth0, one could
-// conceivably configure it however they pleased.
-//
-// In this design, channel 0 is the in-band host channel.
-
-namespace ipmi
-{
-namespace network
-{
-
-extern const ipmi::network::ChannelEthMap ethdevices;
-
-// Given a channel number, return a matching ethernet device, or empty string
-// if there is no match.
-std::string ChanneltoEthernet(int channel)
-{
-    auto dev = ethdevices.find(channel);
-    if (dev == ethdevices.end())
-    {
-        return "";
-    }
-
-    return dev->second;
-}
-
-} // namespace network
-} // namespace ipmi
diff --git a/net.hpp b/net.hpp
deleted file mode 100644
index 21131b2..0000000
--- a/net.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <string>
-
-namespace ipmi
-{
-namespace network
-{
-
-std::string ChanneltoEthernet(int channel);
-
-} // namespace network
-} // namespace ipmi
diff --git a/scripts/channel-example.yaml b/scripts/channel-example.yaml
deleted file mode 100644
index 819f251..0000000
--- a/scripts/channel-example.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-# Channel Number (must be unique) is the key
-1:
-  # ifName the ethernet device name (used in the dbus path)
-  ifName: eth0
-2:
-  ifName: eth1
diff --git a/scripts/channel_gen.py b/scripts/channel_gen.py
deleted file mode 100755
index 77fbd2e..0000000
--- a/scripts/channel_gen.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-import yaml
-import argparse
-from mako.template import Template
-
-
-def generate_cpp(interface_yaml, output_dir):
-    with open(os.path.join(script_dir, interface_yaml), 'r') as f:
-        ifile = yaml.safe_load(f)
-        if not isinstance(ifile, dict):
-            ifile = {}
-
-        # Render the mako template
-
-        t = Template(filename=os.path.join(
-                     script_dir,
-                     "writechannel.mako.cpp"))
-
-        output_cpp = os.path.join(output_dir, "channel-gen.cpp")
-        with open(output_cpp, 'w') as fd:
-            fd.write(t.render(interfaceDict=ifile))
-
-
-def main():
-
-    valid_commands = {
-        'generate-cpp': generate_cpp
-    }
-    parser = argparse.ArgumentParser(
-        description="IPMI ethernet interface parser and code generator")
-
-    parser.add_argument(
-        '-i', '--interface_yaml', dest='interface_yaml',
-        default='example.yaml', help='input sensor yaml file to parse')
-
-    parser.add_argument(
-        "-o", "--output-dir", dest="outputdir",
-        default=".",
-        help="output directory")
-
-    parser.add_argument(
-        'command', metavar='COMMAND', type=str,
-        choices=valid_commands.keys(),
-        help='Command to run.')
-
-    args = parser.parse_args()
-
-    if (not (os.path.isfile(os.path.join(script_dir, args.interface_yaml)))):
-        sys.exit("Can not find input yaml file " + args.interface_yaml)
-
-    function = valid_commands[args.command]
-    function(args.interface_yaml, args.outputdir)
-
-
-if __name__ == '__main__':
-    script_dir = os.path.dirname(os.path.realpath(__file__))
-    main()