virtual-deployment/virtualbox/pybox/consts/node.py
Daniel Caires 1523b70ba2 Fix worker VMs configurations
Change throughout the code every mention of
"compute" as a node to "worker".

Test Plan:
PASS: worker nodes are being configurated as expected
PASS: worker nodes are being deleted when portion of
the code is executed

Story: 2005051
Task: 48726

Change-Id: I6dda10c3b188f14e03dba514cb2063c4c7d1dda4
Signed-off-by: Daniel Caires <daniel.caires@encora.com>
2023-09-05 12:45:37 +00:00

87 lines
2.5 KiB
Python

#!/usr/bin/python3
#
# SPDX-License-Identifier: Apache-2.0
#
"""
This module contains dictionaries for different types of nodes in a virtual environment,
such as CONTROLLER_CEPH, CONTROLLER_LVM, CONTROLLER_AIO, WORKER, and STORAGE.
"""
class Nodes: #pylint: disable=too-few-public-methods
"""The `Nodes` class contains dictionaries for different types of nodes in a
virtual environment."""
CONTROLLER_CEPH = {
'node_type': 'controller-STORAGE',
'memory': 16384,
'cpus': 4,
'disks': {
1:[245760],
2:[245760, 10240],
3:[245760, 10240, 10240],
4:[245760, 10240, 10240, 10240],
5:[245760, 10240, 10240, 10240, 10240],
6:[245760, 10240, 10240, 10240, 10240, 10240],
7:[245760, 10240, 10240, 10240, 10240, 10240, 10240]
}
}
CONTROLLER_LVM = {
'node_type': 'controller-STANDARD',
'memory': 16384,
'cpus': 4,
'disks': {
1:[245760],
2:[245760, 10240],
3:[245760, 10240, 10240],
4:[245760, 10240, 10240, 10240],
5:[245760, 10240, 10240, 10240, 10240],
6:[245760, 10240, 10240, 10240, 10240, 10240],
7:[245760, 10240, 10240, 10240, 10240, 10240, 10240]
}
}
CONTROLLER_AIO = {
'node_type': 'controller-AIO',
'memory': 20480,
'cpus': 4,
'disks': {
1:[245760],
2:[245760, 10240],
3:[245760, 10240, 10240],
4:[245760, 10240, 10240, 10240],
5:[245760, 10240, 10240, 10240, 10240],
6:[245760, 10240, 10240, 10240, 10240, 10240],
7:[245760, 10240, 10240, 10240, 10240, 10240, 10240]
}
}
WORKER = {
'node_type': 'worker',
'memory': 8192,
'cpus': 3,
'disks': {
1:[102400],
2:[102400, 10240],
3:[102400, 10240, 10240],
4:[102400, 10240, 10240, 10240],
5:[102400, 10240, 10240, 10240, 10240],
6:[102400, 10240, 10240, 10240, 10240, 10240],
7:[102400, 10240, 10240, 10240, 10240, 10240, 10240]
}
}
STORAGE = {
'node_type': 'storage',
'memory': 4096,
'cpus': 1,
'disks': {
1:[81920],
2:[81920, 10240],
3:[81920, 10240, 10240],
4:[81920, 10240, 10240, 10240],
5:[81920, 10240, 10240, 10240, 10240]
}
}