예제 #1
0
 def setUp(self):
     super(TestPrePostHooks, self).setUp()
     resp = self.create_plugin()
     self.plugin = attr_plugin.ClusterAttributesPlugin(
         objects.Plugin.get_by_uid(resp.json['id']))
     self.cluster = self.create_cluster([{
         'roles': ['controller'],
         'pending_addition': True
     }, {
         'roles': ['compute'],
         'pending_addition': True
     }])
     self.enable_plugin(self.cluster, self.sample_plugin['name'])
예제 #2
0
    def setUp(self):
        super(TestPlugin, self).setUp()
        self.plugin_metadata = self.env.get_default_plugin_metadata()
        self.plugin = Plugin.create(self.plugin_metadata)
        self.env.create(cluster_kwargs={'mode': 'multinode'},
                        release_kwargs={
                            'version':
                            '2014.2-6.0',
                            'operating_system':
                            'Ubuntu',
                            'orchestrator_data':
                            self.env.get_default_orchestrator_data()
                        })
        self.cluster = self.env.clusters[0]
        self.attr_plugin = attr_plugin.ClusterAttributesPlugin(self.plugin)
        self.env_config = self.env.get_default_plugin_env_config()
        self.get_config = lambda *args: mock.mock_open(read_data=yaml.dump(
            self.env_config))()

        db().flush()
예제 #3
0
 def setUp(self):
     super(TestClusterCompatiblityValidation, self).setUp()
     self.plugin = Plugin.create(self.env.get_default_plugin_metadata())
     self.attr_plugin = attr_plugin.ClusterAttributesPlugin(self.plugin)