// This parameter enables/disables Nagle's algorithm on connections.
// The default is true.
- "tcp-nodelay": true /*,
+ "tcp-nodelay": true,
// This parameter configures consistency level. The default is "quorum".
// Supported values:
// - local-serial
// - local-one
// See https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigSerialConsistency.html for more details.
- "serial-consistency": "serial" */
+ "serial-consistency": "serial"
},
// Addresses will be assigned with a lifetime of 4000 seconds.
// This parameter enables/disables Nagle's algorithm on connections.
// The default is true.
- "tcp-nodelay": true /*,
+ "tcp-nodelay": true,
// This parameter configures consistency level. The default is "quorum".
// Supported values:
// - local-serial
// - local-one
// See https://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlConfigSerialConsistency.html for more details.
- "serial-consistency": "serial" */
+ "serial-consistency": "serial"
},
// Addresses will be assigned with preferred and valid lifetimes
"pools": [ { "pool": "2001:db8:3::/80" } ],
"t1-percent": .45,
"t2-percent": .7
- }]
-},
+ }],
// The following configures logging. It assumes that messages with at
// least informational level (info, warn, error and fatal) should be
// logged to stdout.
-"Logging": {
"loggers": [
{
"name": "kea-dhcp6",
bool
DoubleElement::equals(const Element& other) const {
return (other.getType() == Element::real) &&
- (d == other.doubleValue());
+ (str() == other.str());
}
bool
"classify.json",
"classify2.json",
"comments.json",
+ "config-backend.json",
"dhcpv4-over-dhcpv6.json",
"global-reservations.json",
+ "ha-load-balancing-primary.json",
"hooks.json",
+ "hooks-radius.json",
"leases-expiration.json",
"multiple-options.json",
"mysql-reservations.json",
"classify.json",
"classify2.json",
"comments.json",
+ "config-backend.json",
"dhcpv4-over-dhcpv6.json",
"duid.json",
"global-reservations.json",
+ "ha-hot-standby.json",
"hooks.json",
"iPXE.json",
"leases-expiration.json",
"simple.json",
"softwire46.json",
"stateless.json",
+ "tee-times.json",
"with-ddns.json" };
ElementPtr x;
"classify.json",
"classify2.json",
"comments.json",
+ "config-backend.json",
"dhcpv4-over-dhcpv6.json",
"global-reservations.json",
+ "ha-load-balancing-primary.json",
"hooks.json",
+ "hooks-radius.json",
"leases-expiration.json",
"multiple-options.json",
"mysql-reservations.json",
"classify.json",
"classify2.json",
"comments.json",
+ "config-backend.json",
"dhcpv4-over-dhcpv6.json",
"duid.json",
"global-reservations.json",
+ "ha-hot-standby.json",
"hooks.json",
"iPXE.json",
"leases-expiration.json",
"simple.json",
"softwire46.json",
"stateless.json",
+ "tee-times.json",
"with-ddns.json"
};
for (string file : examples) {
}
val_xpath = string(s_val->xpath());
type = s_val->type();
- ostringstream int_value;
+ ostringstream num_value;
switch (type) {
case SR_CONTAINER_T:
case SR_CONTAINER_PRESENCE_T:
break;
case SR_UINT8_T:
- int_value << static_cast<unsigned>(s_val->data()->get_uint8());
- value = int_value.str();
+ num_value << static_cast<unsigned>(s_val->data()->get_uint8());
+ value = num_value.str();
break;
case SR_UINT16_T:
- int_value << s_val->data()->get_uint16();
- value = int_value.str();
+ num_value << s_val->data()->get_uint16();
+ value = num_value.str();
break;
case SR_UINT32_T:
- int_value << s_val->data()->get_uint32();
- value = int_value.str();
+ num_value << s_val->data()->get_uint32();
+ value = num_value.str();
break;
case SR_INT8_T:
- int_value << static_cast<unsigned>(s_val->data()->get_int8());
- value = int_value.str();
+ num_value << static_cast<unsigned>(s_val->data()->get_int8());
+ value = num_value.str();
break;
case SR_INT16_T:
- int_value << s_val->data()->get_int16();
- value = int_value.str();
+ num_value << s_val->data()->get_int16();
+ value = num_value.str();
break;
case SR_INT32_T:
- int_value << s_val->data()->get_int32();
- value = int_value.str();
+ num_value << s_val->data()->get_int32();
+ value = num_value.str();
+ break;
+
+ case SR_DECIMAL64_T:
+ num_value << s_val->data()->get_decimal64();
+ value = num_value.str();
break;
case SR_IDENTITYREF_T:
default:
isc_throw(NotImplemented,
- "YangReprItem called with unupported type: " << type);
+ "YangReprItem called with unsupported type: " << type);
}
} catch (const sysrepo_exception& ex) {
isc_throw(SysrepoError,
}
break;
+ case SR_DECIMAL64_T:
+ try {
+ double d64 = boost::lexical_cast<double>(item.value_);
+ s_val.reset(new Val(d64));
+ } catch (const boost::bad_lexical_cast&) {
+ isc_throw(BadValue,
+ "'" << item.value_ << "' not a real");
+ }
+ break;
+
default:
isc_throw(NotImplemented,
"YangRepr::set called with unupported type: "