Skip to content

Commit

Permalink
Renamed support to common and handled the imports and md file referen…
Browse files Browse the repository at this point in the history
…ces (gluster#215)

* Renamed support to common
* Modified imports in various files
* Modified references in .md files

Fixes : gluster#213

Signed-off-by: aujjwal-redhat <[email protected]>
  • Loading branch information
aujjwal-redhat authored Apr 22, 2021
1 parent 1c3dc3c commit b3625b9
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Contributing Conventions:
1. Include descriptive PR titles with [<component-name>] prepended.
2. Build and test your changes before submitting a PR.
3. If logging then check the logging.md file in ops/support_ops
3. If logging then check the logging.md file in common/
4. Remember to check the linting issues beforehand as well to prevent your checks from failing.
5. Remember to sign-off your commits
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
- name: Lint with Pylint
run: |
pylint $(pwd)/core/
pylint $(pwd)/support/
pylint $(pwd)/common/
pylint $(pwd)/tests/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Design Doc Link : [Gluster-test Design-doc](https://docs.google.com/document/d/1
### Structure:

core: contains the core redant framework which includes parsing,test_list_builder,test_runner,runner_thread and redant_main.<br>
support: consists of the libs and ops that will help in running the test cases and the mixin class.<br>
common: consists of the libs and ops that will help in running the test cases and the mixin class.<br>
tests: holds the test cases as performace and functional tests and includes parent test. Add any new test cases here.<br>

### To start Working:
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions support/mixin.md → common/mixin.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Once the above support library is created, one needs to add the module inside th
let the `mixin` class inherit from this newly added class.

```
from support.ops.support_ops.rexe import Rexe
from support.ops.gluster_ops.sample_ops1 import sample_ops_class # the newly added module
from support.ops.gluster_ops.sample_ops2 import sample_ops2_class
from common.ops.support_ops.rexe import Rexe
from common.ops.gluster_ops.sample_ops1 import sample_ops_class # the newly added module
from common.ops.gluster_ops.sample_ops2 import sample_ops2_class
class mixin(Rexe, sample_ops_class, sample_ops2_class):
pass
Expand Down
18 changes: 18 additions & 0 deletions common/mixin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Module Name:
Purpose: Refer to the redhat_mixin.md for more information
"""
from common.rexe import Rexe
from common.relog import Logger
from common.ops.support_ops.io_ops import IoOps
from common.ops.gluster_ops.peer_ops import PeerOps
from common.ops.gluster_ops.volume_ops import VolumeOps
from common.ops.gluster_ops.gluster_ops import GlusterOps


class RedantMixin(GlusterOps, VolumeOps, PeerOps, IoOps, Rexe, Logger):
"""
A mixin class for redant project to encompass all ops and support
modules.
"""
pass
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
operations on the glusterd service on the server
or the client.
"""
from support.ops.abstract_ops import AbstractOps
from common.ops.abstract_ops import AbstractOps


class GlusterOps(AbstractOps):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

import socket
from support.ops.abstract_ops import AbstractOps
from common.ops.abstract_ops import AbstractOps

class PeerOps(AbstractOps):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
holds volume related APIs which will be called
from the test case.
"""
from support.ops.abstract_ops import AbstractOps
from common.ops.abstract_ops import AbstractOps


class VolumeOps(AbstractOps):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file contains one class - IoOps which
holds API for running all the IO commands.
"""
from support.ops.abstract_ops import AbstractOps
from common.ops.abstract_ops import AbstractOps


class IoOps(AbstractOps):
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion core/redant_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():

# Creating log dirs.
sys.path.insert(1, ".")
from support.relog import Logger
from common.relog import Logger
args.log_dir = f'{args.log_dir}/{datetime.datetime.now()}'
Logger.log_dir_creation(args.log_dir, test_cases_component,
test_cases_dict)
Expand Down
18 changes: 0 additions & 18 deletions support/mixin.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/parent_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import traceback
import abc
from support.mixin import RedantMixin
from common.mixin import RedantMixin
from datetime import datetime


Expand Down
6 changes: 3 additions & 3 deletions tools/linting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ perform_linting () {
pylint -j 4 --rcfile=.pylintrc ./tests/example/sample_component
pylint -j 4 --rcfile=.pylintrc ./tests/functional
pylint -j 4 --rcfile=.pylintrc ./tests/functional/glusterd
pylint -j 4 --rcfile=.pylintrc ./support
pylint -j 4 --rcfile=.pylintrc ./support/ops/gluster_ops
pylint -j 4 --rcfile=.pylintrc ./support/ops/support_ops
pylint -j 4 --rcfile=.pylintrc ./common
pylint -j 4 --rcfile=.pylintrc ./common/ops/gluster_ops
pylint -j 4 --rcfile=.pylintrc ./common/ops/support_ops
else
pylint -j 4 --rcfile=.pylintrc $FILEPATH
fi
Expand Down

0 comments on commit b3625b9

Please sign in to comment.