def collect_infrastructure_config(self): with provider_class_loader(self.cluster_model.provider, 'InfrastructureConfigCollector')([ *self.configuration_docs, *self.infrastructure_docs ]) as config_collector: config_collector.run()
def process_infrastructure_docs(self): # Build the infrastructure docs with provider_class_loader( self.cluster_model.provider, 'InfrastructureBuilder')( self.input_docs) as infrastructure_builder: self.infrastructure_docs = infrastructure_builder.run() # Validate infrastructure documents with SchemaValidator(self.cluster_model, self.infrastructure_docs) as schema_validator: schema_validator.run()
def get_proxy(self): apiproxy = provider_class_loader(self.cluster_model.provider, 'APIProxy') return apiproxy(self.cluster_model, self.config_docs)
def test_provider_class_loader_infrastructurebuilder_any(): infrastructure_builder = provider_class_loader('any', 'InfrastructureBuilder') assert infrastructure_builder is InfrastructureBuilder
def test_provider_class_loader_infrastructureconfigcollector_any(): infrastructure_config_collector = provider_class_loader('any', 'InfrastructureConfigCollector') assert infrastructure_config_collector is InfrastructureConfigCollector
def test_provider_class_loader_apiproxy_any(): api_proxy = provider_class_loader('any', 'APIProxy') assert api_proxy is APIProxy