Skip to content

Commit

Permalink
Add prompt for core api port
Browse files Browse the repository at this point in the history
  • Loading branch information
shambupujar committed Jan 31, 2024
1 parent 43e16e9 commit 479e51f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions node-runner-cli/config/CoreSystemDConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ def ask_validator_address(self, validator_address=None):
if validator_address is None:
validator_address = Prompts.ask_validator_address()
self.set_validator_address(validator_address)

def ask_core_api_port(self):
core_api_port = Prompts.ask_core_api_port()
self.core_api_port = core_api_port
1 change: 1 addition & 0 deletions node-runner-cli/setup/SystemDSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ def ask_core_node(argument_object: SystemDConfigArguments) -> CoreSystemdConfig:
systemd_config.core_node.generate_download_urls()
systemd_config.core_node.ask_data_directory(argument_object.data_directory)
systemd_config.core_node.ask_validator_address(argument_object.validator)
systemd_config.core_node.ask_core_api_port()
systemd_config.core_node.keydetails = BaseSetup.ask_keydetails(
argument_object.keystore_password, argument_object.new_keystore
)
Expand Down
1 change: 1 addition & 0 deletions node-runner-cli/utils/PromptFeeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class QuestionKeys:
basic_auth_password = "basic_auth_password"
core_api_disable_https_verify = "core_api_disable_https_verify"
core_api_node_name = "core_api_node_name"
core_api_port = "core_api_port"
postgres_location = "postgres_location"
postgres_db_host = "postgres_db_host"
postgres_db_port = "postgres_db_port"
Expand Down
12 changes: 12 additions & 0 deletions node-runner-cli/utils/Prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def ask_postgress_password() -> str:
)
return answer


@staticmethod
def get_postgress_user() -> str:
print(
Expand Down Expand Up @@ -104,6 +105,17 @@ def ask_CopeAPINodeName(default: str = "Core") -> str:
)
return Prompts.check_default(answer, default)

@staticmethod
def ask_core_api_port(default: str = "3334") -> str :
print(
"\nCORE API PORT: This is the port number used by core api. This config only support systemD setup"
)
answer = Helpers.input_guestion(
f"Default value is '{default}'. Press ENTER to accept default value or type in new name':",
QuestionKeys.core_api_port,
)
return Prompts.check_default(answer, default)

@staticmethod
def get_TrustWeighting():
answer = input(
Expand Down

0 comments on commit 479e51f

Please sign in to comment.