diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2019-09-11 23:55:25 +0200 |
---|---|---|
committer | Raquel Medina <raquel.medina@konsulko.com> | 2019-09-12 00:09:13 +0200 |
commit | 8bcc689eb4d31ecbbcf050cb5af32e8e72624732 (patch) | |
tree | ad3e792c05495f8742f43b1b787ee66053c2da22 /network/network.cpp | |
parent | 4221fd2f9e5b72090fe5c2c5f19aa16ab8bf68b8 (diff) |
network: fix arguments on set_properties calls
Update set_properties method arguments to match
agl-service-network binding expectations.
Bug-AGL: SPEC-2676
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I4e4c1c633193270ad14a517fd33eff6bf26b00d3
Diffstat (limited to 'network/network.cpp')
-rw-r--r-- | network/network.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/network/network.cpp b/network/network.cpp index f7baf06..c497c29 100644 --- a/network/network.cpp +++ b/network/network.cpp @@ -105,7 +105,7 @@ void Network::input(int id, QString passphrase) void Network::configureAddress(QString service, QVariantList paramlist) { NetworkMessage *nmsg = new NetworkMessage(); - QJsonObject parameter, properties; + QJsonObject parameter, type, properties; QJsonArray values = QJsonArray::fromVariantList(paramlist); if (values.isEmpty() || values.count() < 4) { @@ -117,7 +117,8 @@ void Network::configureAddress(QString service, QVariantList paramlist) properties.insert("address", values[1]); properties.insert("netmask", values[2]); properties.insert("gateway", values[3]); - parameter.insert("properties", properties); + type.insert("ipv4.configuration", properties); + parameter.insert("properties", type); parameter.insert("service", service); nmsg->createRequest("set_property", parameter); @@ -136,10 +137,12 @@ void Network::configureNameServer(QString service, QVariantList paramlist) return; } - parameter.insert("service", service); - properties.insert("method", values[0]); - properties.insert("nameservers", values[1]); + QStringList nslist = values[1].toString().split(' '); + QJsonArray nameservers = QJsonArray::fromStringList(nslist); + + properties.insert("nameservers.configuration", nameservers); parameter.insert("properties", properties); + parameter.insert("service", service); nmsg->createRequest("set_property", parameter); m_mloop->sendMessage(nmsg); |