예제 #1
0
 def test_name(self):
     module_folder = os.path.dirname(os.path.realpath(__file__))
     folder = os.path.join(module_folder, 'data', 'sites', 'data')
     folder = os.path.abspath(folder)
     self.assertEqual(
         'drop-temp',
         get_server_name(get_pillar_folder(folder), 'csw_web')
     )
예제 #2
0
 def test_name_testing(self):
     """Test sites are added to the pillar twice."""
     module_folder = os.path.dirname(os.path.realpath(__file__))
     folder = os.path.join(module_folder, 'data', 'sites', 'data_testing')
     folder = os.path.abspath(folder)
     self.assertEqual(
         'drop-test',
         get_server_name_test(get_pillar_folder(folder), 'kb_couk')
     )
예제 #3
0
 def __init__(self, minion_id, domain, pillar_folder=None):
     self._minion_id = minion_id
     self._domain = domain
     self._pillar_folder = pillar_folder or get_pillar_folder()
     self._pillar = self._load()
     self._media_root = self._get_media_root()
     self._verify_profile()
     self._verify_sites()
     self._verify_site()
     self._verify_database_settings()
예제 #4
0
파일: fabfile.py 프로젝트: pkimber/fabric
def setup(domain):
    print(green("domain: {}".format(domain)))
    # find the server name for this site
    pillar_folder = get_pillar_folder()
    minion_id = get_server_name(pillar_folder, domain)
    print(yellow("minion_id: {}".format(minion_id)))
    env.site_info = SiteInfo(minion_id, domain)
    # Update env.hosts instead of calling execute()
    env.hosts = domain
    print(yellow("env.hosts: {}".format(env.hosts)))