diff --git a/nise/generators/ocp/ocp_generator.py b/nise/generators/ocp/ocp_generator.py index 7160ad0b..2947a96a 100644 --- a/nise/generators/ocp/ocp_generator.py +++ b/nise/generators/ocp/ocp_generator.py @@ -299,12 +299,11 @@ def _gen_nodes(self): def _gen_namespaces(self, nodes): """Create namespaces on specific nodes and keep relationship.""" namespaces = {} - # TODO EVADEBUG for node in nodes: if node.get("namespaces"): for name, _ in node.get("namespaces").items(): - for i in range(250): # todo update this - namespace = f"{name}_eva_{i}" + for i in range(2500): # TODO PERF_NOTE: update this - number of replicas for each namespace + namespace = f"{name}_perf_{i}" namespaces[namespace] = node else: num_namespaces = randint(2, 12) @@ -358,10 +357,10 @@ def _gen_pods(self, namespaces): for namespace, node in namespaces.items(): namespace2pod[namespace] = [] if node.get("namespaces"): - orig_namespace, eva_suffix = namespace.split("_eva_") + orig_namespace, perf_suffix = namespace.split("_perf_") specified_pods = node.get("namespaces").get(orig_namespace).get("pods") or [] for specified_pod in specified_pods: - pod = f"{specified_pod.get('pod_name', self.fake.word())}_{eva_suffix}" + pod = f"{specified_pod.get('pod_name', self.fake.word())}_{perf_suffix}" namespace2pod[namespace].append(pod) cpu_cores = node.get("cpu_cores") memory_bytes = node.get("memory_bytes") @@ -530,7 +529,7 @@ def _gen_volumes(self, namespaces, namespace2pods): # noqa: R0914,C901 for namespace, node in namespaces.items(): storage_class_default = choice(("gp2", "fast", "slow", "gold")) if node.get("namespaces"): - orig_namespace = namespace.split("_eva_")[0] + orig_namespace = namespace.split("_perf_")[0] specified_volumes = node.get("namespaces").get(orig_namespace).get("volumes", []) for specified_volume in specified_volumes: volume = specified_volume.get("volume_name", self.fake.word()) diff --git a/nise/report.py b/nise/report.py index 17240ace..f15571ec 100644 --- a/nise/report.py +++ b/nise/report.py @@ -97,8 +97,8 @@ def create_temporary_copy(path, temp_file_name, temp_dir_name="None"): """Create temporary copy of a file.""" - temp_dir = "/home/esebesto/work/tasks/2024_01_30_ocp_perf/tmp_nise" - # temp_dir = gettempdir() + # PERF_NOTE - if your /tmp dir doesn't have enough space, you may need to specify different temp_dir + temp_dir = gettempdir() if temp_dir_name: new_dir = os.path.join(temp_dir, temp_dir_name) if not os.path.exists(new_dir):