Skip to content

Commit 390bbf0

Browse files
committed
renamed node._nodeTlsKeyTaskList to node.taskGenerateTLSKeys, node._copyNodeKeys to copyNodeKeysToStaging
Signed-off-by: Jeromy Cannon <[email protected]>
1 parent b526dd4 commit 390bbf0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/commands/node.mjs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export class NodeCommand extends BaseCommand {
329329
* @return a list of subtasks
330330
* @private
331331
*/
332-
// TODO: move to KeyManager and remove List2 functionality
332+
// TODO: move to KeyManager
333333
taskGenerateGossipKeys (keyFormat, nodeIds, keysDir, curDate = new Date(), allNodeIds = null) {
334334
allNodeIds = allNodeIds || nodeIds
335335
if (!Array.isArray(nodeIds) || !nodeIds.every((nodeId) => typeof nodeId === 'string')) {
@@ -434,8 +434,8 @@ export class NodeCommand extends BaseCommand {
434434
* @return return a list of subtasks
435435
* @private
436436
*/
437-
// TODO move to KeyManager and remove List2 functionality
438-
_nodeTlsKeyTaskList (nodeIds, keysDir, curDate = new Date()) {
437+
// TODO move to KeyManager
438+
taskGenerateTLSKeys (nodeIds, keysDir, curDate = new Date()) {
439439
// check if nodeIds is an array of strings
440440
if (!Array.isArray(nodeIds) || !nodeIds.every((nodeId) => typeof nodeId === 'string')) {
441441
throw new FullstackTestingError('nodeIds must be an array of strings')
@@ -466,8 +466,8 @@ export class NodeCommand extends BaseCommand {
466466
return subTasks
467467
}
468468

469-
// TODO: move to KeyManager, rename copyNodeKeysToStaging
470-
async _copyNodeKeys (nodeKey, destDir) {
469+
// TODO: move to KeyManager
470+
async copyNodeKeysToStaging (nodeKey, destDir) {
471471
for (const keyFile of [nodeKey.privateKeyFile, nodeKey.certificateFile]) {
472472
if (!fs.existsSync(keyFile)) {
473473
throw new FullstackTestingError(`file (${keyFile}) is missing`)
@@ -781,7 +781,7 @@ export class NodeCommand extends BaseCommand {
781781
title: 'Generate gRPC TLS keys',
782782
task: async (ctx, parentTask) => {
783783
const config = ctx.config
784-
const subTasks = self._nodeTlsKeyTaskList(config.nodeIds, config.keysDir, config.curDate)
784+
const subTasks = self.taskGenerateTLSKeys(config.nodeIds, config.keysDir, config.curDate)
785785
// set up the sub-tasks
786786
return parentTask.newListr(subTasks, {
787787
concurrent: false,
@@ -811,7 +811,7 @@ export class NodeCommand extends BaseCommand {
811811
for (const nodeId of ctx.config.nodeIds) {
812812
const config = /** @type {NodeSetupConfigClass} **/ ctx.config
813813
const tlsKeyFiles = self.keyManager.prepareTLSKeyFilePaths(nodeId, config.keysDir)
814-
await self._copyNodeKeys(tlsKeyFiles, config.stagingKeysDir)
814+
await self.copyNodeKeysToStaging(tlsKeyFiles, config.stagingKeysDir)
815815
}
816816
}
817817
}
@@ -1157,7 +1157,7 @@ export class NodeCommand extends BaseCommand {
11571157
title: 'Generate gRPC TLS keys',
11581158
task: async (ctx, parentTask) => {
11591159
const config = ctx.config
1160-
const subTasks = self._nodeTlsKeyTaskList(config.nodeIds, config.keysDir, config.curDate)
1160+
const subTasks = self.taskGenerateTLSKeys(config.nodeIds, config.keysDir, config.curDate)
11611161
// set up the sub-tasks
11621162
return parentTask.newListr(subTasks, {
11631163
concurrent: true,
@@ -1621,7 +1621,7 @@ export class NodeCommand extends BaseCommand {
16211621
title: 'Generate gRPC TLS key',
16221622
task: async (ctx, parentTask) => {
16231623
const config = /** @type {NodeAddConfigClass} **/ ctx.config
1624-
const subTasks = self._nodeTlsKeyTaskList([config.nodeId], config.keysDir, config.curDate)
1624+
const subTasks = self.taskGenerateTLSKeys([config.nodeId], config.keysDir, config.curDate)
16251625
// set up the sub-tasks
16261626
return parentTask.newListr(subTasks, {
16271627
concurrent: false,
@@ -1898,7 +1898,7 @@ export class NodeCommand extends BaseCommand {
18981898
const config = /** @type {NodeAddConfigClass} **/ ctx.config
18991899
for (const nodeId of config.allNodeIds) {
19001900
const tlsKeyFiles = self.keyManager.prepareTLSKeyFilePaths(nodeId, config.keysDir)
1901-
await self._copyNodeKeys(tlsKeyFiles, config.stagingKeysDir)
1901+
await self.copyNodeKeysToStaging(tlsKeyFiles, config.stagingKeysDir)
19021902
}
19031903
}
19041904
}
@@ -2161,11 +2161,11 @@ export class NodeCommand extends BaseCommand {
21612161
switch (keyFormat) {
21622162
case constants.KEY_FORMAT_PEM: {
21632163
const signingKeyFiles = this.keyManager.prepareNodeKeyFilePaths(nodeId, keysDir, constants.SIGNING_KEY_PREFIX)
2164-
await this._copyNodeKeys(signingKeyFiles, stagingKeysDir)
2164+
await this.copyNodeKeysToStaging(signingKeyFiles, stagingKeysDir)
21652165

21662166
// generate missing agreement keys
21672167
const agreementKeyFiles = this.keyManager.prepareNodeKeyFilePaths(nodeId, keysDir, constants.AGREEMENT_KEY_PREFIX)
2168-
await this._copyNodeKeys(agreementKeyFiles, stagingKeysDir)
2168+
await this.copyNodeKeysToStaging(agreementKeyFiles, stagingKeysDir)
21692169
break
21702170
}
21712171

0 commit comments

Comments
 (0)