mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add domain registrar catalog cli command
This commit is contained in:
parent
b082f0314c
commit
208df9601f
2 changed files with 11 additions and 2 deletions
|
@ -615,6 +615,7 @@ domain:
|
|||
list:
|
||||
action_help: List registrars configured by DNS zone
|
||||
api: GET /domains/registrars
|
||||
### domain_registrar_catalog()
|
||||
catalog:
|
||||
action_help: List supported registrars API
|
||||
api: GET /domains/registrars/catalog
|
||||
|
|
|
@ -29,8 +29,7 @@ import sys
|
|||
import yaml
|
||||
import functools
|
||||
|
||||
from lexicon.config import ConfigResolver
|
||||
from lexicon.client import Client
|
||||
from lexicon import *
|
||||
|
||||
from moulinette import m18n, msettings, msignals
|
||||
from moulinette.core import MoulinetteError
|
||||
|
@ -907,6 +906,15 @@ def domain_registrar_info(domain):
|
|||
for option_key, option_value in registrar_info['options'].items():
|
||||
logger.info("Option " + option_key + ": " + option_value)
|
||||
|
||||
def domain_registrar_catalog(full):
|
||||
registrars = yaml.load(open(REGISTRAR_LIST_PATH, "r+"))
|
||||
for registrar in registrars:
|
||||
logger.info("Registrar : " + registrar)
|
||||
if full :
|
||||
logger.info("Options : ")
|
||||
for option in registrars[registrar]:
|
||||
logger.info("\t- " + option)
|
||||
|
||||
|
||||
def domain_registrar_set(domain, registrar, args):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue