예제 #1
0
    def test_get_node_spaces_with_plugins(self):
        cluster = self._prepare_env()
        node = self.env.create_node(api=False,
                                    cluster_id=cluster.id,
                                    roles=['controller', 'testing_plugin'],
                                    pending_addition=True)

        self.env.create_plugin(
            cluster=cluster,
            package_version='3.0.0',
            fuel_version=['7.0'],
            volumes_metadata=self.env.get_default_plugin_volumes_config())

        expected_spaces = [{
            'id': 'os',
            'type': 'vg',
            '_allocate_size': 'min'
        }, {
            'id': 'image',
            'type': 'vg',
            '_allocate_size': 'all'
        }, {
            'id': 'test_volume',
            'type': 'vg',
            '_allocate_size': 'all'
        }]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)
예제 #2
0
    def test_get_node_spaces(self):
        cluster = self._prepare_env()
        node = self.env.create_node(api=False, cluster_id=cluster.id, roles=["controller"], pending_addition=True)

        expected_spaces = [
            {"id": "os", "type": "vg", "_allocate_size": "min"},
            {"id": "image", "type": "vg", "_allocate_size": "all"},
        ]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)
예제 #3
0
    def test_get_node_spaces(self):
        cluster = self._prepare_env()
        node = self.env.create_node(
            api=False,
            cluster_id=cluster.id,
            roles=['controller'],
            pending_addition=True
        )

        expected_spaces = [
            {'id': 'os', 'type': 'vg', '_allocate_size': 'min'},
            {'id': 'image', 'type': 'vg', '_allocate_size': 'all'}
        ]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)
예제 #4
0
    def test_get_node_spaces(self):
        cluster = self._prepare_env()
        node = self.env.create_node(
            api=False,
            cluster_id=cluster.id,
            roles=['controller'],
            pending_addition=True
        )

        expected_spaces = [
            {'id': 'os', 'type': 'vg', '_allocate_size': 'min'},
            {'id': 'image', 'type': 'vg', '_allocate_size': 'all'}
        ]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)
예제 #5
0
    def test_get_node_spaces_with_plugins(self):
        cluster = self._prepare_env()
        node = self.env.create_node(
            api=False, cluster_id=cluster.id, roles=["controller", "testing_plugin"], pending_addition=True
        )

        self.env.create_plugin(
            cluster=cluster,
            package_version="3.0.0",
            fuel_version=["7.0"],
            volumes_metadata=self.env.get_default_plugin_volumes_config(),
        )

        expected_spaces = [
            {"id": "os", "type": "vg", "_allocate_size": "min"},
            {"id": "image", "type": "vg", "_allocate_size": "all"},
            {"id": "test_volume", "type": "vg", "_allocate_size": "all"},
        ]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)
예제 #6
0
    def test_get_node_spaces_with_plugins(self):
        cluster = self._prepare_env()
        node = self.env.create_node(
            api=False,
            cluster_id=cluster.id,
            roles=['controller', 'testing_plugin'],
            pending_addition=True
        )

        self.env.create_plugin(
            cluster=cluster,
            package_version='3.0.0',
            fuel_version=['7.0'],
            volumes_metadata=self.env.get_default_plugin_volumes_config()
        )

        expected_spaces = [
            {'id': 'os', 'type': 'vg', '_allocate_size': 'min'},
            {'id': 'image', 'type': 'vg', '_allocate_size': 'all'},
            {'id': 'test_volume', 'type': 'vg', '_allocate_size': 'all'}
        ]

        self.assertItemsEqual(get_node_spaces(node), expected_spaces)