fix(striker-ui-api): make ipmi address optional
This commit is contained in:
parent
7b7d79d50f
commit
8564381815
@ -173,17 +173,17 @@ export const buildManifest = async (
|
|||||||
`Host number must be an integer; got [${hostNumber}]`,
|
`Host number must be an integer; got [${hostNumber}]`,
|
||||||
);
|
);
|
||||||
|
|
||||||
assert(
|
if (ipmiIp) {
|
||||||
REP_IPV4.test(ipmiIp),
|
assert(
|
||||||
`IPMI IP of ${hostId} must be an IPv4; got [${ipmiIp}]`,
|
REP_IPV4.test(ipmiIp),
|
||||||
);
|
`IPMI IP of ${hostId} must be an IPv4; got [${ipmiIp}]`,
|
||||||
|
);
|
||||||
|
|
||||||
|
hosts[`${hostId}_ipmi_ip`] = ipmiIp;
|
||||||
|
}
|
||||||
|
|
||||||
assert.ok(networks, `Host networks is required`);
|
assert.ok(networks, `Host networks is required`);
|
||||||
|
|
||||||
const ipmiIpKey = `${hostId}_ipmi_ip`;
|
|
||||||
|
|
||||||
hosts[ipmiIpKey] = ipmiIp;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object.values(networks).forEach(
|
Object.values(networks).forEach(
|
||||||
({
|
({
|
||||||
|
Loading…
Reference in New Issue
Block a user