summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-json.c')
-rw-r--r--src/network/networkd-json.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/network/networkd-json.c b/src/network/networkd-json.c
index 96973e1ec2..ef3153642b 100644
--- a/src/network/networkd-json.c
+++ b/src/network/networkd-json.c
@@ -80,7 +80,7 @@ static int addresses_append_json(Set *addresses, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Addresses", array);
+ return json_variant_set_field_non_null(v, "Addresses", array);
}
static int neighbor_build_json(Neighbor *n, JsonVariant **ret) {
@@ -121,7 +121,7 @@ static int neighbors_append_json(Set *neighbors, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Neighbors", array);
+ return json_variant_set_field_non_null(v, "Neighbors", array);
}
static int nexthop_group_build_json(NextHop *nexthop, JsonVariant **ret) {
@@ -202,7 +202,7 @@ static int nexthops_append_json(Set *nexthops, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "NextHops", array);
+ return json_variant_set_field_non_null(v, "NextHops", array);
}
static int route_build_json(Route *route, JsonVariant **ret) {
@@ -284,7 +284,7 @@ static int routes_append_json(Set *routes, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Routes", array);
+ return json_variant_set_field_non_null(v, "Routes", array);
}
static int routing_policy_rule_build_json(RoutingPolicyRule *rule, JsonVariant **ret) {
@@ -363,7 +363,7 @@ static int routing_policy_rules_append_json(Set *rules, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "RoutingPolicyRules", array);
+ return json_variant_set_field_non_null(v, "RoutingPolicyRules", array);
}
static int network_append_json(Network *network, JsonVariant **v) {
@@ -522,7 +522,7 @@ static int dns_append_json(Link *link, JsonVariant **v) {
}
}
- return json_variant_merge_pair(v, "DNS", array);
+ return json_variant_set_field_non_null(v, "DNS", array);
}
static int server_append_json_one_addr(int family, const union in_addr_union *a, NetworkConfigSource s, const union in_addr_union *p, JsonVariant **array) {
@@ -646,7 +646,7 @@ static int ntp_append_json(Link *link, JsonVariant **v) {
}
}
- return json_variant_merge_pair(v, "NTP", array);
+ return json_variant_set_field_non_null(v, "NTP", array);
}
static int sip_append_json(Link *link, JsonVariant **v) {
@@ -679,7 +679,7 @@ static int sip_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "SIP", array);
+ return json_variant_set_field_non_null(v, "SIP", array);
}
static int domain_append_json(int family, const char *domain, NetworkConfigSource s, const union in_addr_union *p, JsonVariant **array) {
@@ -775,7 +775,7 @@ static int domains_append_json(Link *link, bool is_route, JsonVariant **v) {
}
}
- return json_variant_merge_pair(v, is_route ? "RouteDomains" : "SearchDomains", array);
+ return json_variant_set_field_non_null(v, is_route ? "RouteDomains" : "SearchDomains", array);
}
static int nta_append_json(const char *nta, NetworkConfigSource s, JsonVariant **array) {
@@ -813,7 +813,7 @@ static int ntas_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "DNSSECNegativeTrustAnchors", array);
+ return json_variant_set_field_non_null(v, "DNSSECNegativeTrustAnchors", array);
}
static int dns_misc_append_json(Link *link, JsonVariant **v) {
@@ -897,7 +897,7 @@ static int dns_misc_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "DNSSettings", array);
+ return json_variant_set_field_non_null(v, "DNSSettings", array);
}
static int captive_portal_append_json(Link *link, JsonVariant **v) {
@@ -936,11 +936,11 @@ static int pref64_append_json(Link *link, JsonVariant **v) {
return r;
}
- r = json_variant_merge_pair(&w, "PREF64", array);
+ r = json_variant_set_field_non_null(&w, "PREF64", array);
if (r < 0)
return r;
- return json_variant_merge_pair(v, "NDisc", w);
+ return json_variant_set_field_non_null(v, "NDisc", w);
}
static int dhcp_server_offered_leases_append_json(Link *link, JsonVariant **v) {
@@ -972,7 +972,7 @@ static int dhcp_server_offered_leases_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Leases", array);
+ return json_variant_set_field_non_null(v, "Leases", array);
}
static int dhcp_server_static_leases_append_json(Link *link, JsonVariant **v) {
@@ -1005,7 +1005,7 @@ static int dhcp_server_static_leases_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "StaticLeases", array);
+ return json_variant_set_field_non_null(v, "StaticLeases", array);
}
static int dhcp_server_append_json(Link *link, JsonVariant **v) {
@@ -1033,7 +1033,7 @@ static int dhcp_server_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "DHCPServer", w);
+ return json_variant_set_field_non_null(v, "DHCPServer", w);
}
static int dhcp6_client_lease_append_json(Link *link, JsonVariant **v) {
@@ -1066,7 +1066,7 @@ static int dhcp6_client_lease_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "Lease", w);
+ return json_variant_set_field_non_null(v, "Lease", w);
}
static int dhcp6_client_pd_append_json(Link *link, JsonVariant **v) {
@@ -1104,7 +1104,7 @@ static int dhcp6_client_pd_append_json(Link *link, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Prefixes", array);
+ return json_variant_set_field_non_null(v, "Prefixes", array);
}
static int dhcp6_client_append_json(Link *link, JsonVariant **v) {
@@ -1125,7 +1125,7 @@ static int dhcp6_client_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "DHCPv6Client", w);
+ return json_variant_set_field_non_null(v, "DHCPv6Client", w);
}
static int dhcp_client_lease_append_json(Link *link, JsonVariant **v) {
@@ -1158,7 +1158,7 @@ static int dhcp_client_lease_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "Lease", w);
+ return json_variant_set_field_non_null(v, "Lease", w);
}
static int dhcp_client_pd_append_json(Link *link, JsonVariant **v) {
@@ -1194,7 +1194,7 @@ static int dhcp_client_pd_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "6rdPrefix", array);
+ return json_variant_set_field_non_null(v, "6rdPrefix", array);
}
static int dhcp_client_append_json(Link *link, JsonVariant **v) {
@@ -1215,7 +1215,7 @@ static int dhcp_client_append_json(Link *link, JsonVariant **v) {
if (r < 0)
return r;
- return json_variant_merge_pair(v, "DHCPv4Client", w);
+ return json_variant_set_field_non_null(v, "DHCPv4Client", w);
}
int link_build_json(Link *link, JsonVariant **ret) {
@@ -1374,7 +1374,7 @@ static int links_append_json(Manager *manager, JsonVariant **v) {
return r;
}
- return json_variant_merge_pair(v, "Interfaces", array);
+ return json_variant_set_field_non_null(v, "Interfaces", array);
}
int manager_build_json(Manager *manager, JsonVariant **ret) {