Exemplo n.º 1
0
 def ensure_tld_exists(self, tld='com'):
     if cfg.CONF.testconfig.no_admin_setup:
         return
     try:
         tld_model = TLDModel.from_dict({'name': tld})
         TLDClient.as_user('admin').post_tld(tld_model)
     except exceptions.Conflict:
         pass
Exemplo n.º 2
0
 def ensure_tld_exists(self, tld='com'):
     if cfg.CONF.testconfig.no_admin_setup:
         return
     try:
         tld_model = TLDModel.from_dict({'name': tld})
         TLDClient.as_user('admin').post_tld(tld_model)
     except exceptions.Conflict:
         pass
Exemplo n.º 3
0
def random_tld_data():
    data = {"name": random_string(prefix='tld')}
    return TLDModel.from_dict(data)
Exemplo n.º 4
0
def random_tld_data():
    data = {
        "name": random_string(prefix='tld')
    }
    return TLDModel.from_dict(data)