diff options
| author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-04-14 17:16:04 +0530 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2017-04-27 12:21:10 +0000 |
| commit | bf9ba40c716867a8bf1e9c8d268d860ee9518b1b (patch) | |
| tree | 85209a29a69fa44c1fbb409bba4c6523063a2293 | |
| parent | 05eb109d47d885040496e2a7ace781a7186b7209 (diff) | |
| download | phosphor-networkd-bf9ba40c716867a8bf1e9c8d268d860ee9518b1b.tar.gz phosphor-networkd-bf9ba40c716867a8bf1e9c8d268d860ee9518b1b.zip | |
Define the create interface for VLAN
Network Manager may implement multiple interface object
Create interface helps in creating specific interface.
Create interface declares the interface for creating
a specific object.
Change-Id: I7433a8569f7e08f9ceb0ff8d01e8c42b04b3b5af
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
| -rw-r--r-- | Makefile.am | 24 | ||||
| -rw-r--r-- | configure.ac | 3 | ||||
| -rw-r--r-- | xyz/openbmc_project/Network/VLAN/Create.interface.yaml | 14 |
3 files changed, 40 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 6f95786..abc5067 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,7 @@ +# Build these headers, don't install them +nobase_nodist_include_HEADERS = \ + xyz/openbmc_project/Network/VLAN/Create/server.hpp + sbin_PROGRAMS = netman_watch_dns phosphor-network-manager @@ -11,7 +15,17 @@ noinst_HEADERS = \ phosphor_network_manager_SOURCES = \ ethernet_interface.cpp \ - network_manager_main.cpp + network_manager_main.cpp \ + xyz/openbmc_project/Network/VLAN/Create/server.cpp + +CLEANFILES = \ + xyz/openbmc_project/Network/VLAN/Create/server.cpp \ + xyz/openbmc_project/Network/VLAN/Create/server.hpp + +BUILT_SOURCES = \ + xyz/openbmc_project/Network/VLAN/Create/server.cpp \ + xyz/openbmc_project/Network/VLAN/Create/server.hpp + phosphor_network_manager_LDFLAGS = \ $(SYSTEMD_LIBS) \ @@ -22,3 +36,11 @@ phosphor_network_manager_CXXFLAGS = \ $(SYSTEMD_CFLAGS) \ $(SDBUSPLUS_CFLAGS) \ $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) + +xyz/openbmc_project/Network/VLAN/Create/server.cpp: xyz/openbmc_project/Network/VLAN/Create.interface.yaml xyz/openbmc_project/Network/VLAN/Create/server.hpp + @mkdir -p `dirname $@` + $(SDBUSPLUSPLUS) -r $(srcdir) interface server-cpp xyz.openbmc_project.Network.VLAN.Create > $@ + +xyz/openbmc_project/Network/VLAN/Create/server.hpp: xyz/openbmc_project/Network/VLAN/Create.interface.yaml + @mkdir -p `dirname $@` + $(SDBUSPLUSPLUS) -r $(srcdir) interface server-header xyz.openbmc_project.Network.VLAN.Create > $@ diff --git a/configure.ac b/configure.ac index 56a430c..17a8efb 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,9 @@ PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221]) PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\ AC_MSG_ERROR(["Requires sdbusplus package."])) + +AC_PATH_PROG([SDBUSPLUSPLUS], [sdbus++]) + PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\ AC_MSG_ERROR(["Requires phosphor-logging package."])) diff --git a/xyz/openbmc_project/Network/VLAN/Create.interface.yaml b/xyz/openbmc_project/Network/VLAN/Create.interface.yaml new file mode 100644 index 0000000..591b0db --- /dev/null +++ b/xyz/openbmc_project/Network/VLAN/Create.interface.yaml @@ -0,0 +1,14 @@ +description: > +methods: + - name: VLAN + description: > + Create VLANInterface Object. + parameters: + - name: InterfaceName + type: string + description: > + Name of the interface. + - name: Id + type: uint16 + description: > + VLAN Identifier. |

