Skip to content

Commit

Permalink
chore(robot): cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Nov 15, 2024
1 parent a360760 commit 0475456
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion e2e/libs/keywords/backing_image_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def cleanup_backing_images(self):

def delete_backing_image_manager(self, name):
self.backing_image.delete_backing_image_manager(name)

def wait_all_backing_image_managers_running(self):
self.backing_image.wait_all_backing_image_managers_running()

Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/backup_keywords.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from backup import Backup

from utility.utility import logging
from utility.utility import get_backupstore

Expand Down
5 changes: 3 additions & 2 deletions e2e/libs/keywords/backupstore_keywords.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from backupstore import Nfs, S3
from utility.utility import get_backupstore
from utility.utility import logging

import os

from utility.utility import get_backupstore


class backupstore_keywords:

Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/common_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from node import Node
from node_exec import NodeExec

from utility.utility import init_k8s_api_client
from utility.utility import generate_name_with_suffix

Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/keywords/engine_image_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from engine_image import EngineImage
from utility.utility import logging


class engine_image_keywords:

Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/keywords/engine_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from engine import Engine
from utility.utility import logging


class engine_keywords:

Expand Down
3 changes: 2 additions & 1 deletion e2e/libs/keywords/host_keywords.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from robot.libraries.BuiltIn import BuiltIn

import os

from host import Harvester, Aws
from host.constant import NODE_REBOOT_DOWN_TIME_SECOND

Expand Down
9 changes: 7 additions & 2 deletions e2e/libs/keywords/k8s_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import asyncio
from robot.libraries.BuiltIn import BuiltIn

import asyncio

from k8s.k8s import restart_kubelet
from k8s.k8s import delete_node
from k8s.k8s import drain_node, force_drain_node
Expand All @@ -10,9 +12,12 @@
from k8s.k8s import get_instance_manager_on_node
from k8s.k8s import check_instance_manager_pdb_not_exist
from k8s.k8s import wait_for_namespace_pods_running
from utility.utility import logging

from node import Node

from utility.utility import logging


class k8s_keywords:

async def restart_kubelet(self, node_name, downtime_in_sec):
Expand Down
2 changes: 2 additions & 0 deletions e2e/libs/keywords/longhorn_deploy_keywords.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from longhorn_deploy import LonghornDeploy


class longhorn_deploy_keywords:

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion e2e/libs/keywords/network_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ def disconnect_node_network_without_waiting_completion(self, node_name, disconne

def drop_pod_egress_traffic(self, pod_name, drop_time_in_sec):
drop_pod_egress_traffic(pod_name, drop_time_in_sec)

def wait_for_block_network_pod_completed(self, pod_name, status, namespace='default'):
wait_for_pod_status(pod_name, status, namespace)
2 changes: 2 additions & 0 deletions e2e/libs/keywords/node_keywords.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from node import Node

from utility.utility import logging


class node_keywords:

def __init__(self):
Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/persistentvolume_keywords.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from persistentvolume import PersistentVolume

from utility.utility import logging


Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/replica_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from replica import Replica


class replica_keywords:

def __init__(self):
Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/setting_keywords.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from setting import Setting


class setting_keywords:

def __init__(self):
Expand Down
4 changes: 2 additions & 2 deletions e2e/libs/keywords/sharemanager_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def wait_for_sharemanagers_deleted(self, name=[]):
def delete_sharemanager(self, name):
return self.sharemanager.delete(name)

def delete_sharemanager_and_wait_for_recreation(self, name):
def delete_sharemanager_and_wait_for_recreation(self, name):
sharemanager = self.sharemanager.get(name)
last_creation_time = sharemanager["metadata"]["creationTimestamp"]
last_creation_time = sharemanager["metadata"]["creationTimestamp"]
self.sharemanager.delete(name)
self.sharemanager.wait_for_restart(name, last_creation_time)

Expand Down
1 change: 0 additions & 1 deletion e2e/libs/keywords/statefulset_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from workload.workload import get_workload_volume_name



class statefulset_keywords:

def __init__(self):
Expand Down
1 change: 1 addition & 0 deletions e2e/libs/keywords/storageclass_keywords.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from utility.utility import logging
from storageclass import StorageClass


class storageclass_keywords:

def __init__(self):
Expand Down
1 change: 0 additions & 1 deletion e2e/libs/keywords/workload_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from utility.constant import ANNOT_EXPANDED_SIZE
from utility.constant import LABEL_LONGHORN_COMPONENT
from utility.utility import logging
from node.node import Node

from volume import Volume
from volume.constant import MEBIBYTE
Expand Down
1 change: 0 additions & 1 deletion e2e/libs/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from utility.utility import get_retry_count_and_interval
from utility.utility import logging

from k8s.k8s import uncordon_node

class Node:

Expand Down

0 comments on commit 0475456

Please sign in to comment.