Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ dmypy.json
.pyre/

.# Editor directories and files
.vscode/
.idea/
.vscode/
.idea/
22 changes: 11 additions & 11 deletions bectl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def activate_be(be_name: str, t: bool = False):
"""
This function activate a BE.
This function activates a BE.
:param be_name: Name of the BE to activate.
:param t: If True, the BE will be activated even if it is mounted.
"""
Expand All @@ -19,24 +19,24 @@ def activate_be(be_name: str, t: bool = False):

def create_be(new_be_name: str, non_active_be: str = None, recursive: bool = False):
"""
This function create a BE.
This function creates a BE.
:param new_be_name: Name of the new BE.
:param non_active_be: Name of the non active BE.
:param non_active_be: Name of the non-active BE.
:param recursive: If True, the BE will be created recursively.
"""
option = '-r' if recursive else ''
cmd_list = ['bectl', 'create', new_be_name]
cmd_list = ['bectl', 'create']
if recursive:
cmd_list.append('-r')
if non_active_be is not None:
cmd_list.insert(2, f'-e {non_active_be}')
if option == '-r':
cmd_list.insert(2, option)
cmd_list.extend(['-e', non_active_be])
cmd_list.append(new_be_name)
bectl_process = run(cmd_list)
assert bectl_process.returncode == 0


def destroy_be(be_name: str, F: bool = False, o: bool = False):
"""
This function destroy a BE.
This function destroys a BE.
:param be_name: Name of the BE to destroy.
:param F: If True, the BE will be destroyed even if it is active.
:param o: If True, the BE will be destroyed even if it is mounted.
Expand All @@ -53,7 +53,7 @@ def destroy_be(be_name: str, F: bool = False, o: bool = False):

def rename_be(original_be_name: str, new_be_name: str):
"""
This function rename a BE.
This function renames a BE.
:param original_be_name: Name of the BE to rename.
:param new_be_name: New name of the BE.
"""
Expand Down Expand Up @@ -94,7 +94,7 @@ def umount_be(be_name: str):

def get_be_list() -> list:
"""
This function get the list of BEs.
This function gets the list of BEs.
:return: A list of BEs.
"""
cmd_list = ['bectl', 'list']
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup

__VERSION__ = '0.6'
__VERSION__ = '0.7'
PROGRAM_VERSION = __VERSION__

setup(
Expand Down