def test_add_authfile(self): self.assertEqual([ config_structure.ConfigItem("authfile", "/path/to/auth.file"), config_structure.ConfigItem("site", "1.1.1.1"), ], config_structure.set_authfile([ config_structure.ConfigItem("site", "1.1.1.1"), ], "/path/to/auth.file"))
def test_add_authfile(self): self.assertEqual( [ config_structure.ConfigItem("authfile", "/path/to/auth.file"), config_structure.ConfigItem("site", "1.1.1.1"), ], config_structure.set_authfile( [ config_structure.ConfigItem("site", "1.1.1.1"), ], "/path/to/auth.file" ) )
def config_setup(env, booth_configuration, overwrite_existing=False): """ create boot configuration list site_list contains site adresses of multisite list arbitrator_list contains arbitrator adresses of multisite """ config_content = config_exchange.from_exchange_format(booth_configuration) config_structure.validate_peers( *config_structure.take_peers(config_content)) env.booth.create_key(config_files.generate_key(), overwrite_existing) config_content = config_structure.set_authfile(config_content, env.booth.key_path) env.booth.create_config(build(config_content), overwrite_existing)
def config_setup(env, booth_configuration, overwrite_existing=False): """ create boot configuration list site_list contains site adresses of multisite list arbitrator_list contains arbitrator adresses of multisite """ config_content = config_exchange.from_exchange_format(booth_configuration) config_structure.validate_peers( *config_structure.take_peers(config_content) ) env.booth.create_key(config_files.generate_key(), overwrite_existing) config_content = config_structure.set_authfile( config_content, env.booth.key_path ) env.booth.create_config(build(config_content), overwrite_existing)