mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add registrar name option to registrar catalog
This commit is contained in:
parent
31c31b1298
commit
d7c88cbf78
2 changed files with 18 additions and 8 deletions
|
@ -620,6 +620,9 @@ domain:
|
||||||
action_help: List supported registrars API
|
action_help: List supported registrars API
|
||||||
api: GET /domains/registrars/catalog
|
api: GET /domains/registrars/catalog
|
||||||
arguments:
|
arguments:
|
||||||
|
-r:
|
||||||
|
full: --registrar-name
|
||||||
|
help: Display given registrar info to create form
|
||||||
-f:
|
-f:
|
||||||
full: --full
|
full: --full
|
||||||
help: Display all details, including info to create forms
|
help: Display all details, including info to create forms
|
||||||
|
|
|
@ -917,15 +917,22 @@ def domain_registrar_info(domain):
|
||||||
for option_key, option_value in registrar_info['options'].items():
|
for option_key, option_value in registrar_info['options'].items():
|
||||||
logger.info("Option " + option_key + ": " + option_value)
|
logger.info("Option " + option_key + ": " + option_value)
|
||||||
|
|
||||||
def domain_registrar_catalog(full):
|
def _print_registrar_info(registrar_name, full, options):
|
||||||
registrars = yaml.load(open(REGISTRAR_LIST_PATH, "r+"))
|
logger.info("Registrar : " + registrar_name)
|
||||||
for registrar in registrars:
|
if full :
|
||||||
logger.info("Registrar : " + registrar)
|
logger.info("Options : ")
|
||||||
if full :
|
for option in options:
|
||||||
logger.info("Options : ")
|
logger.info("\t- " + option)
|
||||||
for option in registrars[registrar]:
|
|
||||||
logger.info("\t- " + option)
|
|
||||||
|
|
||||||
|
def domain_registrar_catalog(registrar_name, full):
|
||||||
|
registrars = yaml.load(open(REGISTRAR_LIST_PATH, "r+"))
|
||||||
|
|
||||||
|
if registrar_name and registrar_name in registrars.keys() :
|
||||||
|
_print_registrar_info(registrar_name, True, registrars[registrar_name])
|
||||||
|
else:
|
||||||
|
for registrar in registrars:
|
||||||
|
_print_registrar_info(registrar, full, registrars[registrar])
|
||||||
|
|
||||||
|
|
||||||
def domain_registrar_set(domain, registrar, args):
|
def domain_registrar_set(domain, registrar, args):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue