From 52f71f545d9d3b0a5621c25ef15fbf6c1b2aa33e Mon Sep 17 00:00:00 2001 From: liuzhe-lz <40699903+liuzhe-lz@users.noreply.github.com> Date: Fri, 12 Jun 2020 17:22:21 +0800 Subject: [PATCH] allow host name as remote ip (#2550) Co-authored-by: liuzhe --- docs/en_US/Tutorial/ExperimentConfig.md | 4 ++-- src/nni_manager/rest_server/restValidationSchemas.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en_US/Tutorial/ExperimentConfig.md b/docs/en_US/Tutorial/ExperimentConfig.md index 6bcd2e53d2..bfe7baf3f0 100644 --- a/docs/en_US/Tutorial/ExperimentConfig.md +++ b/docs/en_US/Tutorial/ExperimentConfig.md @@ -528,9 +528,9 @@ Required in remote mode. A list of key-value pairs with the following keys. #### ip -Required. IP address that is accessible from the current machine. +Required. IP address or host name that is accessible from the current machine. -The IP address of remote machine. +The IP address or host name of remote machine. #### port diff --git a/src/nni_manager/rest_server/restValidationSchemas.ts b/src/nni_manager/rest_server/restValidationSchemas.ts index 06ed3f3f15..a41bb8df77 100644 --- a/src/nni_manager/rest_server/restValidationSchemas.ts +++ b/src/nni_manager/rest_server/restValidationSchemas.ts @@ -10,7 +10,7 @@ export namespace ValidationSchemas { body: { machine_list: joi.array().items(joi.object({ // eslint-disable-line @typescript-eslint/camelcase username: joi.string().required(), - ip: joi.string().ip().required(), + ip: joi.string().hostname().required(), port: joi.number().min(1).max(65535).required(), passwd: joi.string(), sshKeyPath: joi.string(),