Beispiel #1
0
 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()
Beispiel #2
0
    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)
Beispiel #4
0
def test_provider_class_loader_infrastructurebuilder_any():
    infrastructure_builder = provider_class_loader('any', 'InfrastructureBuilder')
    assert infrastructure_builder is InfrastructureBuilder
Beispiel #5
0
def test_provider_class_loader_infrastructureconfigcollector_any():
    infrastructure_config_collector = provider_class_loader('any', 'InfrastructureConfigCollector')
    assert infrastructure_config_collector is InfrastructureConfigCollector
Beispiel #6
0
def test_provider_class_loader_apiproxy_any():
    api_proxy = provider_class_loader('any', 'APIProxy')
    assert api_proxy is APIProxy