Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Rings:1-MinimalX
libKF5NetworkManagerQt
0001-Revert-Add-vxlan-setting.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Revert-Add-vxlan-setting.patch of Package libKF5NetworkManagerQt
From cdcd8210f888732f70007bf53f79b522b4d461ae Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer <wbauer@tmo.at> Date: Mon, 12 Nov 2018 11:46:51 +0100 Subject: [PATCH] Revert "Add vxlan setting" This reverts commit a17d13ddcd712eed7bb12dc37301d85eb81a9a41. It needs a newer NetworkManager than we have in openSUSE Leap 42.3. --- autotests/settings/CMakeLists.txt | 1 - autotests/settings/vxlansettingtest.cpp | 116 -------- autotests/settings/vxlansettingtest.h | 35 --- src/CMakeLists.txt | 1 - src/settings/setting.cpp | 5 - src/settings/setting.h | 3 +- src/settings/vxlansetting.cpp | 467 -------------------------------- src/settings/vxlansetting.h | 111 -------- src/settings/vxlansetting_p.h | 55 ---- 9 files changed, 1 insertion(+), 793 deletions(-) delete mode 100644 autotests/settings/vxlansettingtest.cpp delete mode 100644 autotests/settings/vxlansettingtest.h delete mode 100644 src/settings/vxlansetting.cpp delete mode 100644 src/settings/vxlansetting.h delete mode 100644 src/settings/vxlansetting_p.h diff --git a/autotests/settings/CMakeLists.txt b/autotests/settings/CMakeLists.txt index 64981fa..f347957 100644 --- a/autotests/settings/CMakeLists.txt +++ b/autotests/settings/CMakeLists.txt @@ -34,7 +34,6 @@ NETWORKMANAGERQT_AUTOTESTS( tcsettingtest usersettingtest vlansettingtest - vxlansettingtest vpnsettingtest wimaxsettingtest wiredsettingtest diff --git a/autotests/settings/vxlansettingtest.cpp b/autotests/settings/vxlansettingtest.cpp deleted file mode 100644 index 06edd6f..0000000 --- a/autotests/settings/vxlansettingtest.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright 2018 Billy Laws <blaws05@gmai.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "vxlansettingtest.h" - -#include "settings/vxlansetting.h" - -#include <libnm/NetworkManager.h> - -#include <QTest> - -void VxlanSettingTest::testSetting_data() -{ - QTest::addColumn<quint32>("ageing"); - QTest::addColumn<quint32>("destinationPort"); - QTest::addColumn<quint32>("id"); - QTest::addColumn<bool>("l2Miss"); - QTest::addColumn<bool>("l3Miss"); - QTest::addColumn<bool>("learning"); - QTest::addColumn<quint32>("limit"); - QTest::addColumn<QString>("local"); - QTest::addColumn<QString>("parent"); - QTest::addColumn<bool>("proxy"); - QTest::addColumn<QString>("remote"); - QTest::addColumn<bool>("rsc"); - QTest::addColumn<quint32>("sourcePortMax"); - QTest::addColumn<quint32>("sourcePortMin"); - QTest::addColumn<quint32>("tos"); - QTest::addColumn<quint32>("ttl"); - - QTest::newRow("setting1") - << (quint32) 2 // ageing - << (quint32) 334 // destinationPort - << (quint32) 2 // id - << (bool) true // l2Miss - << (bool) true // l3Miss - << (bool) false // learning - << (quint32) 2 // limit - << QString("foo") // local - << QString("bar") // parent - << (bool) true // proxy - << QString("foo") // remote - << (bool) true // rsc - << (quint32) 2 // sourcePortMax - << (quint32) 2 // sourcePortMin - << (quint32) 2 // tos - << (quint32) 2; // ttl -} - -void VxlanSettingTest::testSetting() -{ - QFETCH(quint32, ageing); - QFETCH(quint32, destinationPort); - QFETCH(quint32, id); - QFETCH(bool, l2Miss); - QFETCH(bool, l3Miss); - QFETCH(bool, learning); - QFETCH(quint32, limit); - QFETCH(QString, local); - QFETCH(QString, parent); - QFETCH(bool, proxy); - QFETCH(QString, remote); - QFETCH(bool, rsc); - QFETCH(quint32, sourcePortMax); - QFETCH(quint32, sourcePortMin); - QFETCH(quint32, tos); - QFETCH(quint32, ttl); - - QVariantMap map; - - map.insert(QLatin1String(NM_SETTING_VXLAN_AGEING), ageing); - map.insert(QLatin1String(NM_SETTING_VXLAN_DESTINATION_PORT), destinationPort); - map.insert(QLatin1String(NM_SETTING_VXLAN_ID), id); - map.insert(QLatin1String(NM_SETTING_VXLAN_L2_MISS), l2Miss); - map.insert(QLatin1String(NM_SETTING_VXLAN_L3_MISS), l3Miss); - map.insert(QLatin1String(NM_SETTING_VXLAN_LEARNING), learning); - map.insert(QLatin1String(NM_SETTING_VXLAN_LIMIT), limit); - map.insert(QLatin1String(NM_SETTING_VXLAN_LOCAL), local); - map.insert(QLatin1String(NM_SETTING_VXLAN_PARENT), parent); - map.insert(QLatin1String(NM_SETTING_VXLAN_PROXY), proxy); - map.insert(QLatin1String(NM_SETTING_VXLAN_REMOTE), remote); - map.insert(QLatin1String(NM_SETTING_VXLAN_RSC), rsc); - map.insert(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MAX), sourcePortMax); - map.insert(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MIN), sourcePortMin); - map.insert(QLatin1String(NM_SETTING_VXLAN_TOS), tos); - map.insert(QLatin1String(NM_SETTING_VXLAN_TTL), ttl); - - NetworkManager::VxlanSetting setting; - setting.fromMap(map); - - QVariantMap map1 = setting.toMap(); - QVariantMap::const_iterator it = map.constBegin(); - while (it != map.constEnd()) { - QCOMPARE(it.value(), map1.value(it.key())); - ++it; - } -} - -QTEST_MAIN(VxlanSettingTest) diff --git a/autotests/settings/vxlansettingtest.h b/autotests/settings/vxlansettingtest.h deleted file mode 100644 index 24f521d..0000000 --- a/autotests/settings/vxlansettingtest.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright 2018 Billy Laws <blaws05@gmai.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef NETWORKMANAGERQT_VXLANSETTING_TEST_H -#define NETWORKMANAGERQT_VXLANSETTING_TEST_H - -#include <QObject> - -class VxlanSettingTest : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void testSetting_data(); - void testSetting(); -}; - -#endif // NETWORKMANAGERQT_VXLANSETTING_TEST_H diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0c7645a..fe8cd70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -89,7 +89,6 @@ set(NetworkManagerQt_SETTINGS_SRCS settings/genericsetting.cpp settings/tunsetting.cpp settings/usersetting.cpp - settings/vxlansetting.cpp ) set(DBUS_INTERFACE_SRCS diff --git a/src/settings/setting.cpp b/src/settings/setting.cpp index cd8aef9..3986036 100644 --- a/src/settings/setting.cpp +++ b/src/settings/setting.cpp @@ -137,9 +137,6 @@ QString NetworkManager::Setting::typeAsString(NetworkManager::Setting::SettingTy case Team: typeString = QLatin1String(NM_SETTING_TEAM_SETTING_NAME); break; - case Vxlan: - typeString = QLatin1String(NM_SETTING_VXLAN_SETTING_NAME); - break; case Proxy: typeString = QLatin1String(NM_SETTING_PROXY_SETTING_NAME); break; @@ -225,8 +222,6 @@ NetworkManager::Setting::SettingType NetworkManager::Setting::typeFromString(con type = Bridge; } else if (typeString == QLatin1String(NM_SETTING_TEAM_SETTING_NAME)) { type = Team; - } else if (typeString == QLatin1String(NM_SETTING_VXLAN_SETTING_NAME)) { - type = Vxlan; } else if (typeString == QLatin1String(NM_SETTING_GENERIC_SETTING_NAME)) { type = Generic; } else if (typeString == QLatin1String(NM_SETTING_USER_SETTING_NAME)) { diff --git a/src/settings/setting.h b/src/settings/setting.h index bc23453..a044a06 100644 --- a/src/settings/setting.h +++ b/src/settings/setting.h @@ -72,7 +72,6 @@ public: Team, Generic, Tun, - Vxlan, Proxy, User, OvsBridge, diff --git a/src/settings/vxlansetting.cpp b/src/settings/vxlansetting.cpp deleted file mode 100644 index 374f2a4..0000000 --- a/src/settings/vxlansetting.cpp +++ /dev/null @@ -1,467 +0,0 @@ -/* - Copyright 2018 Billy Laws <blaws05@gmail.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "vxlansetting.h" -#include "vxlansetting_p.h" - -#include <QDebug> - -NetworkManager::VxlanSettingPrivate::VxlanSettingPrivate() - : name(NM_SETTING_VXLAN_SETTING_NAME) - , ageing(32) - , destinationPort(8472) - , id(0) - , l2Miss(false) - , l3Miss(false) - , learning(true) - , limit(0) - , proxy(false) - , rsc(false) - , sourcePortMax(0) - , sourcePortMin(0) - , tos(0) - , ttl(0) -{ } - -NetworkManager::VxlanSetting::VxlanSetting() - : Setting(Setting::Vxlan) - , d_ptr(new VxlanSettingPrivate()) -{ } - -NetworkManager::VxlanSetting::VxlanSetting(const NetworkManager::VxlanSetting::Ptr &other) - : Setting(other) - , d_ptr(new VxlanSettingPrivate()) -{ - setAgeing(other->ageing()); - setDestinationPort(other->destinationPort()); - setId(other->id()); - setL2Miss(other->l2Miss()); - setL3Miss(other->l3Miss()); - setLearning(other->learning()); - setLimit(other->limit()); - setLocal(other->local()); - setParent(other->parent()); - setProxy(other->proxy()); - setRemote(other->remote()); - setRsc(other->rsc()); - setSourcePortMax(other->sourcePortMax()); - setSourcePortMin(other->sourcePortMin()); - setTos(other->tos()); - setTtl(other->ttl()); -} - -NetworkManager::VxlanSetting::~VxlanSetting() -{ - delete d_ptr; -} - -QString NetworkManager::VxlanSetting::name() const -{ - Q_D(const VxlanSetting); - - return d->name; -} - -void NetworkManager::VxlanSetting::setAgeing(quint32 ageing) -{ - Q_D(VxlanSetting); - - d->ageing = ageing; -} - -quint32 NetworkManager::VxlanSetting::ageing() const -{ - Q_D(const VxlanSetting); - - return d->ageing; -} - -void NetworkManager::VxlanSetting::setDestinationPort(quint32 port) -{ - Q_D(VxlanSetting); - - d->destinationPort = port; -} - -quint32 NetworkManager::VxlanSetting::destinationPort() const -{ - Q_D(const VxlanSetting); - - return d->destinationPort; -} - -void NetworkManager::VxlanSetting::setId(quint32 id) -{ - Q_D(VxlanSetting); - - d->id = id; -} - -quint32 NetworkManager::VxlanSetting::id() const -{ - Q_D(const VxlanSetting); - - return d->id; -} - -void NetworkManager::VxlanSetting::setL2Miss(bool enable) -{ - Q_D(VxlanSetting); - - d->l2Miss = enable; -} - -bool NetworkManager::VxlanSetting::l2Miss() const -{ - Q_D(const VxlanSetting); - - return d->l2Miss; -} - -void NetworkManager::VxlanSetting::setL3Miss(bool enable) -{ - Q_D(VxlanSetting); - - d->l3Miss = enable; -} - -bool NetworkManager::VxlanSetting::l3Miss() const -{ - Q_D(const VxlanSetting); - - return d->l3Miss; -} - -void NetworkManager::VxlanSetting::setLearning(bool enable) -{ - Q_D(VxlanSetting); - - d->learning = enable; -} - -bool NetworkManager::VxlanSetting::learning() const -{ - Q_D(const VxlanSetting); - - return d->learning; -} - - -void NetworkManager::VxlanSetting::setLimit(quint32 limit) -{ - Q_D(VxlanSetting); - - d->limit = limit; -} - -quint32 NetworkManager::VxlanSetting::limit() const -{ - Q_D(const VxlanSetting); - - return d->limit; -} - -void NetworkManager::VxlanSetting::setLocal(QString local) -{ - Q_D(VxlanSetting); - - d->local = local; -} - -QString NetworkManager::VxlanSetting::local() const -{ - Q_D(const VxlanSetting); - - return d->local; -} - -void NetworkManager::VxlanSetting::setParent(QString parent) -{ - Q_D(VxlanSetting); - - d->parent = parent; -} - -QString NetworkManager::VxlanSetting::parent() const -{ - Q_D(const VxlanSetting); - - return d->parent; -} - -void NetworkManager::VxlanSetting::setProxy(bool enable) -{ - Q_D(VxlanSetting); - - d->proxy = enable; -} - -bool NetworkManager::VxlanSetting::proxy() const -{ - Q_D(const VxlanSetting); - - return d->proxy; -} - -void NetworkManager::VxlanSetting::setRemote(QString remote) -{ - Q_D(VxlanSetting); - - d->remote = remote; -} - -QString NetworkManager::VxlanSetting::remote() const -{ - Q_D(const VxlanSetting); - - return d->remote; -} - -void NetworkManager::VxlanSetting::setRsc(bool enable) -{ - Q_D(VxlanSetting); - - d->rsc = enable; -} - -bool NetworkManager::VxlanSetting::rsc() const -{ - Q_D(const VxlanSetting); - - return d->rsc; -} - -void NetworkManager::VxlanSetting::setSourcePortMax(quint32 maxPort) -{ - Q_D(VxlanSetting); - - d->sourcePortMax = maxPort; -} - -quint32 NetworkManager::VxlanSetting::sourcePortMax() const -{ - Q_D(const VxlanSetting); - - return d->sourcePortMax; -} - -void NetworkManager::VxlanSetting::setSourcePortMin(quint32 minPort) -{ - Q_D(VxlanSetting); - - d->sourcePortMin = minPort; -} - -quint32 NetworkManager::VxlanSetting::sourcePortMin() const -{ - Q_D(const VxlanSetting); - - return d->sourcePortMin; -} - -void NetworkManager::VxlanSetting::setTos(quint32 tos) -{ - Q_D(VxlanSetting); - - d->tos = tos; -} - -quint32 NetworkManager::VxlanSetting::tos() const -{ - Q_D(const VxlanSetting); - - return d->tos; -} - -void NetworkManager::VxlanSetting::setTtl(quint32 ttl) -{ - Q_D(VxlanSetting); - - d->ttl = ttl; -} - -quint32 NetworkManager::VxlanSetting::ttl() const -{ - Q_D(const VxlanSetting); - - return d->ttl; -} -void NetworkManager::VxlanSetting::fromMap(const QVariantMap &setting) -{ - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_AGEING))) { - setAgeing(setting.value(QLatin1String(NM_SETTING_VXLAN_AGEING)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_DESTINATION_PORT))) { - setDestinationPort(setting.value(QLatin1String(NM_SETTING_VXLAN_DESTINATION_PORT)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_ID))) { - setId(setting.value(QLatin1String(NM_SETTING_VXLAN_ID)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_L2_MISS))) { - setL2Miss(setting.value(QLatin1String(NM_SETTING_VXLAN_L2_MISS)).toBool()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_L3_MISS))) { - setL3Miss(setting.value(QLatin1String(NM_SETTING_VXLAN_L3_MISS)).toBool()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_LEARNING))) { - setLearning(setting.value(QLatin1String(NM_SETTING_VXLAN_LEARNING)).toBool()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_LIMIT))) { - setLimit(setting.value(QLatin1String(NM_SETTING_VXLAN_LIMIT)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_LOCAL))) { - setLocal(setting.value(QLatin1String(NM_SETTING_VXLAN_LOCAL)).toString()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_PARENT))) { - setParent(setting.value(QLatin1String(NM_SETTING_VXLAN_PARENT)).toString()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_PROXY))) { - setProxy(setting.value(QLatin1String(NM_SETTING_VXLAN_PROXY)).toBool()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_REMOTE))) { - setRemote(setting.value(QLatin1String(NM_SETTING_VXLAN_REMOTE)).toString()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_RSC))) { - setRsc(setting.value(QLatin1String(NM_SETTING_VXLAN_RSC)).toBool()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MAX))) { - setSourcePortMax(setting.value(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MAX)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MIN))) { - setSourcePortMin(setting.value(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MIN)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_TOS))) { - setTos(setting.value(QLatin1String(NM_SETTING_VXLAN_TOS)).toUInt()); - } - - if (setting.contains(QLatin1String(NM_SETTING_VXLAN_TTL))) { - setTtl(setting.value(QLatin1String(NM_SETTING_VXLAN_TTL)).toUInt()); - } -} - -QVariantMap NetworkManager::VxlanSetting::toMap() const -{ - QVariantMap setting; - - if (ageing() != 32) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_AGEING), ageing()); - } - - if (destinationPort() != 8472) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_DESTINATION_PORT), destinationPort()); - } - - if (id()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_ID), id()); - } - - if (l2Miss()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_L2_MISS), l2Miss()); - } - - if (l3Miss()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_L3_MISS), l3Miss()); - } - - if (!learning()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_LEARNING), learning()); - } - - if (limit()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_LIMIT), limit()); - } - - if (!local().isEmpty()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_LOCAL), local()); - } - - if (!parent().isEmpty()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_PARENT), parent()); - } - - if (proxy()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_PROXY), proxy()); - } - - if (!remote().isEmpty()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_REMOTE), remote()); - } - - if (rsc()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_RSC), rsc()); - } - - if (sourcePortMax()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MAX), sourcePortMax()); - } - - if (sourcePortMin()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_SOURCE_PORT_MIN), sourcePortMin()); - } - - if (tos()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_TOS), tos()); - } - - if (ttl()) { - setting.insert(QLatin1String(NM_SETTING_VXLAN_TTL), ttl()); - } - - return setting; -} - -QDebug NetworkManager::operator <<(QDebug dbg, const NetworkManager::VxlanSetting &setting) -{ - dbg.nospace() << "type: " << setting.typeAsString(setting.type()) << '\n'; - dbg.nospace() << "initialized: " << !setting.isNull() << '\n'; - - dbg.nospace() << NM_SETTING_VXLAN_AGEING << ": " << setting.ageing() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_DESTINATION_PORT << ": " << setting.destinationPort() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_ID << ": " << setting.id() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_L2_MISS << ": " << setting.l2Miss() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_L3_MISS << ": " << setting.l3Miss() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_LEARNING << ": " << setting.learning() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_LIMIT << ": " << setting.limit() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_LOCAL << ": " << setting.local() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_PARENT << ": " << setting.parent() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_PROXY << ": " << setting.proxy() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_REMOTE << ": " << setting.remote() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_RSC << ": " << setting.rsc() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_SOURCE_PORT_MAX << ": " << setting.sourcePortMax() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_SOURCE_PORT_MIN << ": " << setting.sourcePortMin() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_TOS << ": " << setting.tos() << '\n'; - dbg.nospace() << NM_SETTING_VXLAN_TTL << ": " << setting.ttl() << '\n'; - - return dbg.maybeSpace(); -} diff --git a/src/settings/vxlansetting.h b/src/settings/vxlansetting.h deleted file mode 100644 index 5f7c6f0..0000000 --- a/src/settings/vxlansetting.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright 2018 Billy Laws <blaws05@gmail.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef NETWORKMANAGERQT_VXLAN_SETTING_H -#define NETWORKMANAGERQT_VXLAN_SETTING_H - -#include <networkmanagerqt/networkmanagerqt_export.h> -#include "setting.h" - -#include <QString> - -namespace NetworkManager -{ - -class VxlanSettingPrivate; - -/** - * Represents vxlan setting - */ -class NETWORKMANAGERQT_EXPORT VxlanSetting : public Setting -{ -public: - typedef QSharedPointer<VxlanSetting> Ptr; - typedef QList<Ptr> List; - VxlanSetting(); - explicit VxlanSetting(const Ptr &other); - ~VxlanSetting() override; - - QString name() const override; - - void setAgeing(quint32 ageing); - quint32 ageing() const; - - void setDestinationPort(quint32 port); - quint32 destinationPort() const; - - void setId(quint32 id); - quint32 id() const; - - void setL2Miss(bool enable); - bool l2Miss() const; - - void setL3Miss(bool enable); - bool l3Miss() const; - - void setLearning(bool enable); - bool learning() const; - - void setLimit(quint32 limit); - quint32 limit() const; - - void setLocal(QString local); - QString local() const; - - void setParent(QString parent); - QString parent() const; - - void setProxy(bool enable); - bool proxy() const; - - void setRemote(QString remote); - QString remote() const; - - void setRsc(bool enable); - bool rsc() const; - - void setSourcePortMax(quint32 maxPort); - quint32 sourcePortMax() const; - - void setSourcePortMin(quint32 minPort); - quint32 sourcePortMin() const; - - void setTos(quint32 tos); - quint32 tos() const; - - void setTtl(quint32 ttl); - quint32 ttl() const; - - void fromMap(const QVariantMap &setting) override; - - QVariantMap toMap() const override; - -protected: - VxlanSettingPrivate *d_ptr; - -private: - Q_DECLARE_PRIVATE(VxlanSetting) -}; - -NETWORKMANAGERQT_EXPORT QDebug operator<<(QDebug dbg, const VxlanSetting &setting); - -} - -#endif // NETWORKMANAGERQT_VXLAN_SETTING_H diff --git a/src/settings/vxlansetting_p.h b/src/settings/vxlansetting_p.h deleted file mode 100644 index 3cf3fe2..0000000 --- a/src/settings/vxlansetting_p.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright 2018 Billy Laws <blaws05@gmail.com> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef NETWORKMANAGERQT_VXLAN_SETTING_P_H -#define NETWORKMANAGERQT_VXLAN_SETTING_P_H - -#include <QString> - -namespace NetworkManager -{ - -class VxlanSettingPrivate -{ -public: - VxlanSettingPrivate(); - - QString name; - quint32 ageing; - quint32 destinationPort; - quint32 id; - bool l2Miss; - bool l3Miss; - bool learning; - quint32 limit; - QString local; - QString parent; - bool proxy; - QString remote; - bool rsc; - quint32 sourcePortMax; - quint32 sourcePortMin; - quint32 tos; - quint32 ttl; -}; - -} - -#endif // NETWORKMANAGERQT_VXLAN_SETTING_P_H -- 2.16.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor