Skip to content

Commit 9c19687

Browse files
committed
fix(node-opal-orchestra): Use snake_case for options
Signed-off-by: Steffen Vogel <[email protected]>
1 parent 41e465c commit 9c19687

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

etc/examples/nodes/opal_orchestra.conf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ nodes = {
4545

4646
# For 'local'
4747
extcomm = "udp";
48-
addrframework = "10.168.13.5";
49-
portframework = 10000
50-
coreframework = 0
51-
coreclient = 0
52-
nicframework = "eno2"
53-
nicclient = "eno1"
48+
addr_framework = "10.168.13.5";
49+
port_framework = 10000
50+
core_framework = 0
51+
core_client = 0
52+
nic_framework = "eno2"
53+
nic_client = "eno1"
5454

5555
# For 'remote'
5656
card = "test"
57-
pciindex = 0
57+
pci_index = 0
5858

5959
# For 'dolphin'
60-
nodeIdFramework = 0
61-
segmentId = 0
60+
node_id_framework = 0
61+
segment_id = 0
6262
}
6363

6464
in = {

lib/nodes/opal_orchestra/ddf.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,22 +174,22 @@ std::string ConnectionLocal::getDetails() const {
174174
details += fmt::format(", extcomm={}", *extcomm);
175175

176176
if (addressFramework) {
177-
details += fmt::format(", addrframework={}", *addressFramework);
177+
details += fmt::format(", addr_framework={}", *addressFramework);
178178
}
179179
if (portFramework) {
180-
details += fmt::format(", portframework={}", portFramework.value());
180+
details += fmt::format(", port_framework={}", portFramework.value());
181181
}
182182
if (nicFramework) {
183-
details += fmt::format(", nicframework={}", *nicFramework);
183+
details += fmt::format(", nic_framework={}", *nicFramework);
184184
}
185185
if (nicClient) {
186-
details += fmt::format(", nicclient={}", *nicClient);
186+
details += fmt::format(", nic_client={}", *nicClient);
187187
}
188188
if (coreFramework) {
189-
details += fmt::format(", coreframework={}", coreFramework.value());
189+
details += fmt::format(", core_framework={}", coreFramework.value());
190190
}
191191
if (coreClient) {
192-
details += fmt::format(", coreclient={}", coreClient.value());
192+
details += fmt::format(", core_client={}", coreClient.value());
193193
}
194194
}
195195
details += " }";
@@ -243,9 +243,9 @@ void ConnectionLocal::parse(json_t *json) {
243243

244244
auto ret = json_unpack_ex(
245245
json, &err, 0, "{ s?: s, s?: s, s?: i, s?: s, s?: s, s?: i, s?: i }",
246-
"extcomm", &ec, "addrframework", &af, "portframework", &pf,
247-
"nicframework", &nf, "nicclient", &nc, "coreframework", &cf, "coreclient",
248-
&cc);
246+
"extcomm", &ec, "addr_framework", &af, "port_framework", &pf,
247+
"nic_framework", &nf, "nic_client", &nc, "core_framework", &cf,
248+
"core_client", &cc);
249249
if (ret) {
250250
throw ConfigError(json, err, "node-config-node-opal-orchestra-connection",
251251
"Failed to parse configuration of local connection");
@@ -275,7 +275,7 @@ void ConnectionLocal::parse(json_t *json) {
275275
}
276276

277277
std::string ConnectionRemote::getDetails() const {
278-
return fmt::format(", connection={{ type=remote, name={}, pciindex={} }}",
278+
return fmt::format(", connection={{ type=remote, name={}, pci_index={} }}",
279279
name, pciIndex);
280280
}
281281

@@ -295,7 +295,7 @@ void ConnectionRemote::parse(json_t *json) {
295295
json_error_t err;
296296

297297
int ret = json_unpack_ex(json, &err, 0, "{ s: s, s: i }", "card", &nme,
298-
"pciindex", &pciIndex);
298+
"pci_index", &pciIndex);
299299
if (ret) {
300300
throw ConfigError(
301301
json, err, "node-config-node-opal-orchestra-rfm",
@@ -307,7 +307,7 @@ void ConnectionRemote::parse(json_t *json) {
307307

308308
std::string ConnectionDolphin::getDetails() const {
309309
return fmt::format(
310-
", connection={{ type=dolphin, nodeIdFramework={}, segmentId={} }}",
310+
", connection={{ type=dolphin, node_id_framework={}, segment_id={} }}",
311311
nodeIdFramework, segmentId);
312312
}
313313

@@ -324,8 +324,9 @@ void ConnectionDolphin::toXml(xmlNode *domain) const {
324324

325325
void ConnectionDolphin::parse(json_t *json) {
326326
json_error_t err;
327-
auto ret = json_unpack_ex(json, &err, 0, "{ s: i, s: i }", "nodeIdFramework",
328-
&nodeIdFramework, "segmentId", &segmentId);
327+
auto ret =
328+
json_unpack_ex(json, &err, 0, "{ s: i, s: i }", "node_id_framework",
329+
&nodeIdFramework, "segment_id", &segmentId);
329330
if (ret) {
330331
throw ConfigError(json, err, "node-config-node-opal-orchestra-connection",
331332
"Failed to parse configuration of dolphin connection");

0 commit comments

Comments
 (0)