Skip to content

Commit 096ae7b

Browse files
committed
Package name changed to glustercli from gluster/cli
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
1 parent 11b5d1f commit 096ae7b

26 files changed

+93
-93
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ pycscope.*
88
build
99
dist
1010
docs/_build
11+
.DS_Store

gluster/__init__.py

-3
This file was deleted.

gluster/cli/__init__.py

-37
This file was deleted.

gluster/metrics/__init__.py

-12
This file was deleted.

glustercli/__init__.py

Whitespace-only changes.

gluster/cli/Makefile.am renamed to glustercli/cli/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ EXTRA_DIST= __init__.py volume.py utils.py snapshot.py quota.py \
22
peer.py parsers.py georep.py bricks.py bitrot.py heal.py \
33
nfs_ganesha.py rebalance.py tier.py
44

5-
cliutilsdir = @BUILD_PYTHON_SITE_PACKAGES@/gluster/cli
5+
cliutilsdir = @BUILD_PYTHON_SITE_PACKAGES@/glustercli
66

77
cliutils_PYTHON = __init__.py volume.py utils.py snapshot.py quota.py \
88
peer.py parsers.py georep.py bricks.py bitrot.py heal.py \

glustercli/cli/__init__.py

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from glustercli.cli import volume
4+
from glustercli.cli import bitrot
5+
from glustercli.cli import bricks
6+
from glustercli.cli import georep
7+
from glustercli.cli import peer
8+
from glustercli.cli import quota
9+
from glustercli.cli import snapshot
10+
from glustercli.cli import heal
11+
from glustercli.cli import nfs_ganesha
12+
from glustercli.cli import rebalance
13+
14+
from glustercli.cli.utils import (set_gluster_path,
15+
set_gluster_socket,
16+
set_ssh_host,
17+
set_ssh_pem_file,
18+
ssh_connection,
19+
GlusterCmdException)
20+
21+
# Reexport
22+
__all__ = ["volume",
23+
"bitrot",
24+
"bricks",
25+
"georep",
26+
"peer",
27+
"quota",
28+
"snapshot",
29+
"heal",
30+
"nfs_ganesha",
31+
"rebalance",
32+
"set_gluster_path",
33+
"set_gluster_socket",
34+
"set_ssh_host",
35+
"set_ssh_pem_file",
36+
"ssh_connection",
37+
"GlusterCmdException"]

gluster/cli/bitrot.py renamed to glustercli/cli/bitrot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import bitrot_execute, bitrot_execute_xml, GlusterCmdException
4-
from .parsers import parse_bitrot_scrub_status
3+
from glustercli.cli.utils import bitrot_execute, bitrot_execute_xml, GlusterCmdException
4+
from glustercli.cli.parsers import parse_bitrot_scrub_status
55

66
THROTTLE_TYPES = ["lazy", "normal", "aggressive"]
77
FREQUENCY_TYPES = ["hourly", "daily", "weekly", "biweekly", "monthly"]

gluster/cli/bricks.py renamed to glustercli/cli/bricks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import volume_execute, volume_execute_xml
4-
from .parsers import parse_remove_brick_status
3+
from glustercli.cli.utils import volume_execute, volume_execute_xml
4+
from glustercli.cli.parsers import parse_remove_brick_status
55

66

77
def add(volname, bricks, stripe=None, replica=None, arbiter=None, force=False):

gluster/cli/georep.py renamed to glustercli/cli/georep.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import georep_execute, georep_execute_xml, gluster_system_execute
4-
from .parsers import parse_georep_config, parse_georep_status
5-
from . import volume
3+
from glustercli.cli.utils import georep_execute, georep_execute_xml, gluster_system_execute
4+
from glustercli.cli.parsers import parse_georep_config, parse_georep_status
5+
from glustercli.cli import volume
66

77

88
def gsec_create(ssh_key_prefix=True):

gluster/cli/heal.py renamed to glustercli/cli/heal.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import heal_execute, heal_execute_xml, GlusterCmdException
4-
from .parsers import parse_heal_statistics, parse_heal_info
3+
from glustercli.cli.utils import heal_execute, heal_execute_xml, GlusterCmdException
4+
from glustercli.cli.parsers import parse_heal_statistics, parse_heal_info
55

66

77
HEAL_INFO_TYPES = ["healed", "heal-failed", "split-brain"]

gluster/cli/nfs_ganesha.py renamed to glustercli/cli/nfs_ganesha.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import gluster_execute
3+
from glustercli.cli.utils import gluster_execute
44

55

66
def enable():
File renamed without changes.

gluster/cli/peer.py renamed to glustercli/cli/peer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import peer_execute, peer_execute_xml, gluster_execute_xml, GlusterCmdException
4-
from .parsers import parse_peer_status, parse_pool_list
3+
from glustercli.cli.utils import peer_execute, peer_execute_xml, gluster_execute_xml, GlusterCmdException
4+
from glustercli.cli.parsers import parse_peer_status, parse_pool_list
55

66

77
def probe(host):

gluster/cli/quota.py renamed to glustercli/cli/quota.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import quota_execute, quota_execute_xml, volume_execute
4-
from .parsers import parse_quota_list_paths, parse_quota_list_objects
3+
from glustercli.cli.utils import quota_execute, quota_execute_xml, volume_execute
4+
from glustercli.cli.parsers import parse_quota_list_paths, parse_quota_list_objects
55

66

77
def inode_quota_enable(volname):

gluster/cli/rebalance.py renamed to glustercli/cli/rebalance.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import volume_execute, volume_execute_xml
4-
from .parsers import parse_rebalance_status
3+
from glustercli.cli.utils import volume_execute, volume_execute_xml
4+
from glustercli.cli.parsers import parse_rebalance_status
55

66

77
def fix_layout_start(volname):

gluster/cli/snapshot.py renamed to glustercli/cli/snapshot.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import snapshot_execute, snapshot_execute_xml
4-
from .parsers import (parse_snapshot_status,
5-
parse_snapshot_info,
6-
parse_snapshot_list)
3+
from glustercli.cli.utils import snapshot_execute, snapshot_execute_xml
4+
from glustercli.cli.parsers import (parse_snapshot_status,
5+
parse_snapshot_info,
6+
parse_snapshot_list)
77

88

99
def activate(snapname, force=False):

gluster/cli/utils.py renamed to glustercli/cli/utils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ def execute(cmd):
4848
rc = stdout.channel.recv_exit_status()
4949
return (rc, stdout.read().strip(), stderr.read().strip())
5050
else:
51-
p = subprocess.Popen(c, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
51+
p = subprocess.Popen(c, stdout=subprocess.PIPE,
52+
stderr=subprocess.PIPE,
53+
universal_newlines=True)
5254
out, err = p.communicate()
5355
return (p.returncode, out, err)
5456

gluster/cli/volume.py renamed to glustercli/cli/volume.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# -*- coding: utf-8 -*-
22

3-
from .utils import volume_execute, volume_execute_xml, GlusterCmdException
4-
from .parsers import (parse_volume_info,
5-
parse_volume_status,
6-
parse_volume_options,
7-
parse_volume_list,
8-
parse_volume_profile_info)
3+
from glustercli.cli.utils import volume_execute, volume_execute_xml, \
4+
GlusterCmdException
5+
from glustercli.cli.parsers import (parse_volume_info,
6+
parse_volume_status,
7+
parse_volume_options,
8+
parse_volume_list,
9+
parse_volume_profile_info)
910

1011
# Following import are not used in this file, but imported to make
1112
# it available via volume.(noqa to ignore in pep8 check)
12-
from . import bitrot # noqa
13-
from . import bricks # noqa
14-
from . import heal # noqa
15-
from . import quota # noqa
16-
from . import rebalance # noqa
17-
from . import tier # noqa
13+
from glustercli.cli import bitrot # noqa
14+
from glustercli.cli import bricks # noqa
15+
from glustercli.cli import heal # noqa
16+
from glustercli.cli import quota # noqa
17+
from glustercli.cli import rebalance # noqa
1818

1919

2020
LOCK_KINDS = ["blocked", "granted", "all"]

glustercli/metrics/__init__.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from glustercli.metrics.process import local_processes
4+
from glustercli.metrics.utilization import local_utilization
5+
from glustercli.metrics.diskstats import local_diskstats
6+
7+
# Reexport
8+
__all__ = [
9+
"local_processes",
10+
"local_utilization",
11+
"local_diskstats"
12+
]

gluster/metrics/diskstats.py renamed to glustercli/metrics/diskstats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import subprocess
33

4-
from utils import get_local_bricks
4+
from glustercli.metrics.utils import get_local_bricks
55

66

77
default_diskstat = {

gluster/metrics/process.py renamed to glustercli/metrics/process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import subprocess
22

3-
import cmdlineparser
3+
glustercli.metrics import cmdlineparser
44

55
GLUSTER_PROCS = [
66
"glusterd",

gluster/metrics/utilization.py renamed to glustercli/metrics/utilization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from utils import get_local_bricks
3+
from glustercli.metrics.utils import get_local_bricks
44

55

66
def local_utilization(volname=None):

gluster/metrics/utils.py renamed to glustercli/metrics/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from gluster.cli import volume
1+
from glustercli.cli import volume
22

33
UUID_FILE = "/var/lib/glusterd/glusterd.info"
44

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
22
import re
3-
from setuptools import setup, find_packages
3+
from setuptools import setup
44

5-
VERSION = 0.6
5+
VERSION = "0.7.1"
66

77
def read(fname):
88
return open(os.path.join(os.path.dirname(__file__), fname)).read()
@@ -17,7 +17,7 @@ def read(fname):
1717
author='Aravinda Vishwanathapura',
1818
author_email='[email protected]',
1919
url='https://github.com/gluster/glustercli-python',
20-
packages=find_packages(),
20+
packages=["glustercli", "glustercli.cli", "glustercli.metrics"],
2121
classifiers=[
2222
'Development Status :: 5 - Production/Stable',
2323
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)