summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2013-05-24 11:50:02 -0400
committerLuis Pabon <lpabon@redhat.com>2013-05-28 11:04:48 -0700
commit1811a9b05e7c862be34792be71f4932aed32e18f (patch)
tree69b7b6edaa514573e906f984cda1eda22c3e5c90
parentf58af3ac29017d743ad78f0f6a7bb25464c629f7 (diff)
Remove unused is_marker method from utils.
Change-Id: I67f695b57405465c7bec22c437c2169403fa59dd Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/5089 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com>
-rw-r--r--gluster/swift/common/utils.py16
-rw-r--r--test/unit/common/test_utils.py14
2 files changed, 0 insertions, 30 deletions
diff --git a/gluster/swift/common/utils.py b/gluster/swift/common/utils.py
index 2cbb7f3..11e9140 100644
--- a/gluster/swift/common/utils.py
+++ b/gluster/swift/common/utils.py
@@ -230,22 +230,6 @@ def validate_object(metadata):
return False
-def is_marker(metadata):
- if not metadata:
- logging.warn('is_marker: No metadata')
- return False
-
- if X_OBJECT_TYPE not in metadata.keys():
- logging.warn('is_marker: X_OBJECT_TYPE missing from metadata: %s',
- metadata)
- return False
-
- if metadata[X_OBJECT_TYPE] == MARKER_DIR:
- return True
- else:
- return False
-
-
def _update_list(path, cont_path, src_list, reg_file=True, object_count=0,
bytes_used=0, obj_list=[]):
# strip the prefix off, also stripping the leading and trailing slashes
diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py
index c645509..0f6dba3 100644
--- a/test/unit/common/test_utils.py
+++ b/test/unit/common/test_utils.py
@@ -1004,17 +1004,3 @@ class TestUtils(unittest.TestCase):
utils.X_OBJECT_TYPE: 'na' }
ret = utils.validate_object(md)
assert ret
-
- def test_is_marker_empty(self):
- assert False == utils.is_marker(None)
-
- def test_is_marker_missing(self):
- assert False == utils.is_marker( { 'foo': 'bar' } )
-
- def test_is_marker_not_marker(self):
- md = { utils.X_OBJECT_TYPE: utils.DIR }
- assert False == utils.is_marker(md)
-
- def test_is_marker(self):
- md = { utils.X_OBJECT_TYPE: utils.MARKER_DIR }
- assert utils.is_marker(md)