Esempio n. 1
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     configuration.app_name = 'TestJobQueueConfigurator'
     boot_config = BootProperties()
     configuration.property_groups.add_property_group(boot_config)
     messaging_conf = MessagingProperties()
     messaging_conf.connection_address = 'testaddr'
     configuration.property_groups.add_property_group(messaging_conf)
     job_queue_conf = JobQueueProperties()
     configuration.property_groups.add_property_group(job_queue_conf)
     return configuration
Esempio n. 2
0
    def __bootstrap_config(self):
        configuration = BootstrapApplicationConfiguration()
        configuration.app_name = "TestApp"
        boot_config = BootProperties()
        configuration.property_groups.add_property_group(boot_config)
        messaging_conf = MessagingProperties()
        messaging_conf.connection_address = "kafka"
        configuration.property_groups.add_property_group(messaging_conf)
        self.mock_infrastructure_messaging_service = MagicMock()
        self.mock_lifecycle_messaging_service = MagicMock()
        resource_driver_conf = ResourceDriverProperties()
        configuration.property_groups.add_property_group(resource_driver_conf)

        self.mock_topic_creator = MagicMock()

        return configuration
Esempio n. 3
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     boot_config = BootProperties()
     configuration.property_groups.add_property_group(boot_config)
     management_config = ManagementProperties()
     configuration.property_groups.add_property_group(management_config)
     return configuration
Esempio n. 4
0
File: api.py Progetto: IBM/ignition
 def build(self):
     return BootstrapApplicationConfiguration(self.app_name,
                                              self.property_sources,
                                              self.property_groups,
                                              self.service_configurators,
                                              self.api_configurators,
                                              self.api_error_converter)
Esempio n. 5
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     boot_config = BootProperties()
     configuration.property_groups.add_property_group(boot_config)
     messaging_conf = MessagingProperties()
     configuration.property_groups.add_property_group(messaging_conf)
     return configuration
 def setUp(self):
     property_groups = PropertyGroups()
     property_groups.add_property_group(AnsibleProperties())
     property_groups.add_property_group(ProcessProperties())
     self.configuration = BootstrapApplicationConfiguration(app_name='test', property_sources=[], property_groups=property_groups, service_configurators=[], api_configurators=[], api_error_converter=None)
     render_context_service = ExtendedResourceTemplateContextService()
     templating = Jinja2TemplatingService()
     self.ansible_client = AnsibleClient(self.configuration, templating=templating, render_context_service=render_context_service, event_logger=EmptyEventLogger())
Esempio n. 7
0
 def setUp(self):
     self.tmp_workspace = tempfile.mkdtemp()
     self.mock_messaging_service = MagicMock()
     self.mock_ansible_client = MagicMock()
     property_groups = PropertyGroups()
     property_groups.add_property_group(AnsibleProperties())
     process_props = ProcessProperties()
     process_props.use_pool = False
     property_groups.add_property_group(process_props)
     self.configuration = BootstrapApplicationConfiguration(app_name='test', property_sources=[], property_groups=property_groups, service_configurators=[], api_configurators=[], api_error_converter=None)
Esempio n. 8
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     boot_config = BootProperties()
     boot_config.management.api_service_enabled = False
     boot_config.management.service_enabled = False
     boot_config.management.health.service_enabled = False
     configuration.property_groups.add_property_group(boot_config)
     management_config = ManagementProperties()
     configuration.property_groups.add_property_group(management_config)
     return configuration
Esempio n. 9
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     boot_config = BootProperties()
     configuration.property_groups.add_property_group(boot_config)
     resource_driver_config = ResourceDriverProperties()
     configuration.property_groups.add_property_group(
         resource_driver_config)
     messaging_config = MessagingProperties()
     messaging_config.connection_address = 'test'
     configuration.property_groups.add_property_group(messaging_config)
     return configuration
 def setUp(self):
     property_groups = PropertyGroups()
     property_groups.add_property_group(AnsibleProperties())
     property_groups.add_property_group(ProcessProperties())
     self.configuration = BootstrapApplicationConfiguration(
         app_name='test',
         property_sources=[],
         property_groups=property_groups,
         service_configurators=[],
         api_configurators=[],
         api_error_converter=None)
     self.ansible_client = AnsibleClient(self.configuration)
Esempio n. 11
0
    def setUp(self):
        self.mock_request_queue_service = MagicMock()
        self.mock_messaging_service = MagicMock()
        self.mock_ansible_client = MagicMock()

        self.configuration = BootstrapApplicationConfiguration()
        self.configuration.app_name = "TestApp"
        self.configuration.property_groups.add_property_group(BootProperties())
        messaging_conf = MessagingProperties()
        messaging_conf.connection_address = "kafka"
        self.configuration.property_groups.add_property_group(messaging_conf)
        self.configuration.property_groups.add_property_group(ResourceDriverProperties())
        process_properties = ProcessProperties()
        process_properties.process_pool_size = 1
        self.configuration.property_groups.add_property_group(process_properties)
Esempio n. 12
0
 def __bootstrap_config(self):
     configuration = BootstrapApplicationConfiguration()
     configuration.app_name = 'TestProgressEventLogConfigurator'
     boot_config = BootProperties()
     configuration.property_groups.add_property_group(boot_config)
     return configuration