def test_india_server_exclusions(self): self.pillowtops['fluff'] = [ 'custom.bihar.models.CareBiharFluffPillow', 'custom.opm.models.OpmUserFluffPillow', ] pillows = [c.name for c in get_pillows_for_env('india', self.pillowtops)] self.assertNotIn('OpmUserFluffPillow', pillows) self.assertIn('CareBiharFluffPillow', pillows)
def test_india_server_exclusions(self): self.pillowtops['fluff'] = [ 'custom.bihar.models.CareBiharFluffPillow', 'custom.opm.models.OpmCaseFluffPillow', 'custom.opm.models.OpmUserFluffPillow', ] pillows = get_pillows_for_env('india', self.pillowtops) self.assertNotIn('custom.opm.models.OpmCaseFluffPillow', pillows) self.assertNotIn('custom.opm.models.OpmUserFluffPillow', pillows) self.assertIn('custom.bihar.models.CareBiharFluffPillow', pillows)
def render_configuration_file(self, conf_template_string, params): """ Hacky override to make pillowtop config. Multiple configs within the conf file """ environment = params['environment'] configs = [] all_pillows = get_pillows_for_env(environment, settings.PILLOWTOPS) for pillow_config in all_pillows: pillow_name = pillow_config.name pillow_params = { 'pillow_name': pillow_name, 'pillow_option': ' --pillow-name %s' % pillow_name } pillow_params.update(params) pillow_rendering = super(Command, self).render_configuration_file(conf_template_string, pillow_params) configs.append(pillow_rendering) return '\n\n'.join(configs)
def render_configuration_file(self, conf_template_string): """ Hacky override to make pillowtop config. Multiple configs within the conf file """ environment = self.params['environment'] configs = [] all_pillows = get_pillows_for_env(environment, settings.PILLOWTOPS) for full_name in all_pillows: pillow_name = full_name.split('.')[-1] pillow_params = { 'pillow_name': pillow_name, 'pillow_option': ' --pillow-name %s' % pillow_name } pillow_params.update(self.params) pillow_rendering = conf_template_string % pillow_params configs.append(pillow_rendering) return '\n\n'.join(configs)
def render_configuration_file(self, conf_template_string, params): """ Hacky override to make pillowtop config. Multiple configs within the conf file """ environment = params['environment'] configs = [] all_pillows = get_pillows_for_env(environment, settings.PILLOWTOPS) for full_name in all_pillows: pillow_name = full_name.split('.')[-1] pillow_params = { 'pillow_name': pillow_name, 'pillow_option': ' --pillow-name %s' % pillow_name } pillow_params.update(params) pillow_rendering = super(Command, self).render_configuration_file( conf_template_string, pillow_params) configs.append(pillow_rendering) return '\n\n'.join(configs)